Re: unwanted crontab message

2024-09-14 Thread Michael Kjörling
On 13 Sep 2024 17:53 -0400, from g...@wooledge.org (Greg Wooledge): > For the record, Debian 12 has vim 9.0.x and a /usr/share/vim/vim90/ > directory. According to ... oh, > that web page is not responding for me. Sorry, I can't check what > version(s) of Debian m

Re: unwanted crontab message

2024-09-13 Thread Greg Wooledge
On Fri, Sep 13, 2024 at 22:46:09 +, Andy Smith wrote: > I just ran crontab -e as a fresh user and it actually invoked > /usr/bin/sensible-editor and asked me which editor I wanted to use > (now and in future). So perhaps the man page for crontab is out of > date. Agreed. hobbi

Re: unwanted crontab message

2024-09-13 Thread Will Mengarini
Or ... disambiguate which Vim crontab -e is using, so it's not vim.tiny. * Will Mengarini [24-09/13=Fri 15:47 -0700]: > You are getting Vim error messages from a version of Vim that does > not support scripting (probably vim.tiny). That version is probably > installed on your sys

Re: unwanted crontab message

2024-09-13 Thread Will Mengarini
& root PATHs are more elaborate than the one to which cron defaults.) The solution is to set PATH in your crontab. * Marcus Park [24-09/14=Sat 06:12 +0800]: > > Andy Smith : >> As to why whatever it is set as right now is doing that, first work >> out where it is getting the

Re: unwanted crontab message

2024-09-13 Thread Andy Smith
and nano won't do that. I assume you are looking at the environment of the same user that is executing "crontab -e"? When the editor from "crontab -e" is running, you could go into another terminal and look at all your processes to see which actual binary is being called. IIR

Re: scp in crontab problem

2024-09-13 Thread Marcus Park
basti: /usr/bin/scp -i /home/userYX/.ssh/myKEY r...@example.com ... updated: it's really due to environment issue, after I add the '-i' path to scp, jobs run well now. Thanks basti.

Re: unwanted crontab message

2024-09-13 Thread Marcus Park
, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, 2107-2109, 2109-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919, 213, 1840, 1846-1847, 2110-2112, 2121 ... Then I logged out and re-login the system, run 'crontab -e', the error still shows. Maybe I got bad

Re: unwanted crontab message

2024-09-13 Thread Andy Smith
Hi, On Sat, Sep 14, 2024 at 05:44:42AM +0800, Marcus Park wrote: > When I run 'crontab -e' the screen shows some errors like, > > $ crontab -e > Error detected while processing /usr/share/vim/vim82/filetype.vim: I'm pretty sure that these errors will be coming from th

Re: unwanted crontab message

2024-09-13 Thread Greg Wooledge
On Sat, Sep 14, 2024 at 05:44:42 +0800, Marcus Park wrote: > Hi list, > > When I run 'crontab -e' the screen shows some errors like, > > $ crontab -e > Error detected while processing /usr/share/vim/vim82/filetype.vim: > line 10: > E319: Sorry, the command is

unwanted crontab message

2024-09-13 Thread Marcus Park
Hi list, When I run 'crontab -e' the screen shows some errors like, $ crontab -e Error detected while processing /usr/share/vim/vim82/filetype.vim: line 10: E319: Sorry, the command is not available in this version: let did_load_filetypes = 1 line 13: E319: Sorry, the comm

Re: scp in crontab problem

2024-09-13 Thread Charles Curley
d why the private key? Usually one transfers the public key from one's own computer to another, and one keeps the private key, well, private. > > When I scp a file from this VPS to another one by hand without > password, it works. > > But when I put this scp into crontab,

Re: scp in crontab problem

2024-09-13 Thread Greg Wooledge
On Fri, Sep 13, 2024 at 20:24:51 +0800, Marcus Park wrote: > I have put the private key into my debian VPS (in ~/.ssh/ dir). Does this private key have a passphrase? > When I scp a file from this VPS to another one by hand without password, it > works. > > But when I put this s

Re: scp in crontab problem

2024-09-13 Thread basti
On 13.09.24 14:24, Marcus Park wrote: Hi list, I have put the private key into my debian VPS (in ~/.ssh/ dir). When I scp a file from this VPS to another one by hand without password, it works. But when I put this scp into crontab, it seems not work. The scp in crontab via private key

scp in crontab problem

2024-09-13 Thread Marcus Park
Hi list, I have put the private key into my debian VPS (in ~/.ssh/ dir). When I scp a file from this VPS to another one by hand without password, it works. But when I put this scp into crontab, it seems not work. The scp in crontab via private key didn't run as I expect, nothing was c

Re: where are the crontab files in Trixie?

2024-02-29 Thread Max Nikulin
On 29/02/2024 11:32, David Wright wrote: On Wed 28 Feb 2024 at 22:32:57 (+0700), Max Nikulin wrote: On 28/02/2024 10:35, David Wright wrote: In which case, I'd write the remaining cron line as: @reboot sleep 99 && echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id I am in doubts if it

Re: where are the crontab files in Trixie?

2024-02-28 Thread David Wright
On Wed 28 Feb 2024 at 22:32:57 (+0700), Max Nikulin wrote: > On 28/02/2024 10:35, David Wright wrote: > > In which case, I'd write the remaining cron line as: > > > >@reboot sleep 99 && echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id > > I am in doubts if it is a task for cron. Wouldn't

Re: where are the crontab files in Trixie?

2024-02-28 Thread Max Nikulin
On 29/02/2024 00:00, Kamil Jońca wrote: How precisely linger works? (what it starts? What not etc) I read about lingering some time ago, and I have had impression (wrong?) that it may conflict with my normal session. Multiple sessions may be started for a user: DM, ssh, VT logins. I am unsur

Re: where are the crontab files in Trixie?

2024-02-28 Thread Kamil Jońca
Andy Smith writes: > Hi, > > On Wed, Feb 28, 2024 at 04:47:59PM +0100, Kamil Jońca wrote: >> Andy Smith writes: >> > Once you enable lingering for a user, that user's timers will >> > trigger all the time. >> >> IIRC lingered user cannot be "normal" with session and so on. Am I >> wrong? > > H

Re: where are the crontab files in Trixie?

2024-02-28 Thread Andy Smith
Hi, On Wed, Feb 28, 2024 at 04:47:59PM +0100, Kamil Jońca wrote: > Andy Smith writes: > > Once you enable lingering for a user, that user's timers will > > trigger all the time. > > IIRC lingered user cannot be "normal" with session and so on. Am I > wrong? How do you mean? On several machines

Re: where are the crontab files in Trixie?

2024-02-28 Thread Kamil Jońca
Andy Smith writes: > Hi, > > On Wed, Feb 28, 2024 at 05:49:58AM +0100, Kamil Jońca wrote: >> With cron, regular user can set up his/her jobs wihtout using admin >> credentials, and these jobs will be triggered regardless of being logged >> in. Is it possible with systemd timers? > > Once you enab

Re: where are the crontab files in Trixie?

2024-02-28 Thread Nicolas George
Max Nikulin (12024-02-28): > I am in doubts if it is a task for cron. Wouldn't udev rules be better? Or even the good old simple way that still works: install modulename command... This command instructs modprobe to run your command instead of inserting the module in

Re: where are the crontab files in Trixie?

2024-02-28 Thread Max Nikulin
On 28/02/2024 10:35, David Wright wrote: In which case, I'd write the remaining cron line as: @reboot sleep 99 && echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id I am in doubts if it is a task for cron. Wouldn't udev rules be better? https://stackoverflow.com/questions/442833/how-to-

Re: where are the crontab files in Trixie?

2024-02-28 Thread Andy Smith
Hi, On Wed, Feb 28, 2024 at 05:49:58AM +0100, Kamil Jońca wrote: > With cron, regular user can set up his/her jobs wihtout using admin > credentials, and these jobs will be triggered regardless of being logged > in. Is it possible with systemd timers? Once you enable lingering for a user, that us

Re: where are the crontab files in Trixie?

2024-02-28 Thread Andy Smith
Hello, On Tue, Feb 27, 2024 at 02:58:13PM -0500, Greg Wooledge wrote: > I don't foresee real cron going away any time soon. If you today install bookworm base system and select no packages, the only reason why you get cron is because logrotate depends upon it. If you do not need logrotate then yo

Re: where are the crontab files in Trixie?

2024-02-27 Thread Kamil Jońca
Gremlin writes: [...] > > https://wiki.archlinux.org/title/Systemd-networkd > https://wiki.archlinux.org/title/Wireless_bonding > > I am using systemd-networkd and systemd-resolved and have removed > Networkmanager, ifupdown and isc-dhcp. Also avahi, modemmanager, > openssh-sftp-server openssh-se

Re: where are the crontab files in Trixie?

2024-02-27 Thread David Wright
rcmfmac/new_id where you can choose a better estimate than 99. > > Anyway, that got me down the rabbit hole to try to find where the crontab > > file is. > > Per-user crontabs are in /var/spool/cron/crontabs, or at least are in > Bookworm (and this has been the case for what feels

Re: where are the crontab files in Trixie?

2024-02-27 Thread Greg Wooledge
On Tue, Feb 27, 2024 at 10:12:11PM -0500, The Wanderer wrote: > On 2024-02-27 at 14:09, Gary Dale wrote: > > as does find / -name crontab > > Invoked how? In particular, as which user? > > Assuming that the crontab files are actually named literally 'crontab' >

Re: where are the crontab files in Trixie?

2024-02-27 Thread The Wanderer
On 2024-02-27 at 14:09, Gary Dale wrote: > On 2024-02-27 10:26, The Wanderer wrote: > >> On 2024-02-27 at 10:15, Gary Dale wrote: >> >>> Anyway, that got me down the rabbit hole to try to find where the >>> crontab file is. >>> >>>ls -l /r

Re: where are the crontab files in Trixie?

2024-02-27 Thread Gremlin
On 2/27/24 14:58, Greg Wooledge wrote: On Tue, Feb 27, 2024 at 12:52:33PM -0700, Charles Curley wrote: On Tue, 27 Feb 2024 14:13:49 -0500 Jeffrey Walton wrote: The debian wiki suggests that the handling of cron/anacron is evolving. That sounds like a euphemism for "being killed off" by Syst

Re: where are the crontab files in Trixie?

2024-02-27 Thread Gremlin
On 2/27/24 14:33, Gary Dale wrote: On 2024-02-27 14:13, Jeffrey Walton wrote: On Tue, Feb 27, 2024 at 2:12 PM Gary Dale wrote: On 2024-02-27 10:25, Kushal Kumaran wrote: On Tue, Feb 27 2024 at 10:15:59 AM, Gary Dale wrote: [...] Can anyone explain how Trixie is handling crontabs now? This

Re: where are the crontab files in Trixie?

2024-02-27 Thread Greg Wooledge
On Tue, Feb 27, 2024 at 12:52:33PM -0700, Charles Curley wrote: > On Tue, 27 Feb 2024 14:13:49 -0500 > Jeffrey Walton wrote: > > > > The debian wiki suggests that the handling of cron/anacron is > > > evolving. > > > > That sounds like a euphemism for "being killed off" by Systemd and > > its

Re: where are the crontab files in Trixie?

2024-02-27 Thread Charles Curley
On Tue, 27 Feb 2024 14:13:49 -0500 Jeffrey Walton wrote: > > The debian wiki suggests that the handling of cron/anacron is > > evolving. > > That sounds like a euphemism for "being killed off" by Systemd and > its timers. These days cron and anacron are run as services/timers by systemd. roo

Re: where are the crontab files in Trixie?

2024-02-27 Thread Gary Dale
On 2024-02-27 14:13, Jeffrey Walton wrote: On Tue, Feb 27, 2024 at 2:12 PM Gary Dale wrote: On 2024-02-27 10:25, Kushal Kumaran wrote: On Tue, Feb 27 2024 at 10:15:59 AM, Gary Dale wrote: [...] Can anyone explain how Trixie is handling crontabs now? This behavior has existed forever. I'm o

Re: where are the crontab files in Trixie?

2024-02-27 Thread Jeffrey Walton
On Tue, Feb 27, 2024 at 2:12 PM Gary Dale wrote: > > On 2024-02-27 10:25, Kushal Kumaran wrote: > > On Tue, Feb 27 2024 at 10:15:59 AM, Gary Dale > > wrote: > >> [...] > >> Can anyone explain how Trixie is handling crontabs now? > > This behavior has existed forever. I'm on bookworm, though, so

Re: where are the crontab files in Trixie?

2024-02-27 Thread Gary Dale
/drivers/brcmfmac/new_id However when I add those lines to the root's crontab using # crontab -e as @reboot /usr/sbin/modprobe brcmfmac @reboot echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id the second line fails. I get an e-mail stating "/bin/sh: 1: cannot create /sys/bus/usb/dr

Re: where are the crontab files in Trixie?

2024-02-27 Thread Gary Dale
/drivers/brcmfmac/new_id However when I add those lines to the root's crontab using # crontab -e as @reboot /usr/sbin/modprobe brcmfmac @reboot echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id the second line fails. I get an e-mail stating "/bin/sh: 1: cannot create /sys/bus/usb/dr

Re: where are the crontab files in Trixie?

2024-02-27 Thread Gary Dale
On 2024-02-27 10:26, The Wanderer wrote: On 2024-02-27 at 10:15, Gary Dale wrote: Anyway, that got me down the rabbit hole to try to find where the crontab file is. ls -l /root/cron* ls: cannot access '/root/cron*': No such file or directory also # whereis crontab crontab

Re: where are the crontab files in Trixie?

2024-02-27 Thread Michael Kjörling
On 27 Feb 2024 10:15 -0500, from g...@extremeground.com (Gary Dale): > However when I add those lines to the root's crontab using # crontab -e as > > @reboot /usr/sbin/modprobe brcmfmac > @reboot echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id > > the second l

Re: where are the crontab files in Trixie?

2024-02-27 Thread Greg Wooledge
_id > > However when I add those lines to the root's crontab using # crontab -e as > > @reboot /usr/sbin/modprobe brcmfmac > @reboot echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id > > the second line fails. I get an e-mail stating "/bin/sh: 1: cannot

Re: where are the crontab files in Trixie?

2024-02-27 Thread The Wanderer
On 2024-02-27 at 10:15, Gary Dale wrote: > Anyway, that got me down the rabbit hole to try to find where the > crontab file is. > > ls -l /root/cron* > ls: cannot access '/root/cron*': No such file or directory > > also > > # whereis crontab > cro

Re: where are the crontab files in Trixie?

2024-02-27 Thread Kushal Kumaran
> > However when I add those lines to the root's crontab using # crontab -e as > > @reboot /usr/sbin/modprobe brcmfmac > @reboot echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id > > the second line fails. I get an e-mail stating "/bin/sh: 1: cannot > create

where are the crontab files in Trixie?

2024-02-27 Thread Gary Dale
I'm running Debian/Trixie on an AMD64 system. I have an old wifi adapter that Linux has problems with that works once I run: /usr/sbin/modprobe brcmfmac echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id However when I add those lines to the root's crontab using # crontab -

Re: auto restarting in crontab

2023-03-17 Thread debian-user
ut sometimes I > am using the latest ruby (3.x). For example, different streaming > libraries for ruby require different versions. > > For instance, I developed a ruby client for Kafka streaming, and > deployed it in crontab, and this script must use ruby 3.x version. > > 0 * *

Re: auto restarting in crontab

2023-03-17 Thread Nicolas George
debian-u...@howorth.org.uk (12023-03-17): > Please don't send me an individual copy of emails; I am subscribed. Nobody can remember who is subscribed and who is not: do not write this in your mail, write it in the headers, just like I did. -- Nicolas George

Re: auto restarting in crontab

2023-03-17 Thread debian-user
> > > installed in the system by rbenv. > > > > > > > > Since I often change default ruby in interactive shell, this may > > > > break the ruby for sysadmin job in crontab. What’s the solution > > > > for this? > > > > > > Ever

Re: auto restarting in crontab

2023-03-16 Thread Greg Wooledge
d a ruby client for Kafka streaming, and deployed it > in crontab, and this script must use ruby 3.x version. > > 0 * * * * ruby kafka-consumer.rb How is cron going to know which ruby to use? Cron uses a very minimalist PATH. From crontab(5): Several environment variables are set

Re: auto restarting in crontab

2023-03-16 Thread p...@ymail.ne.jp
different versions. For instance, I developed a ruby client for Kafka streaming, and deployed it in crontab, and this script must use ruby 3.x version. 0 * * * * ruby kafka-consumer.rb But one day I changed the default version in my personal path to ruby 1.x via rbenv, the crontab above should not work. This is a risk, is it? regards Yong

Re: auto restarting in crontab

2023-03-16 Thread Jeffrey Walton
> > > > > > > Since I often change default ruby in interactive shell, this may > > > > break the ruby for sysadmin job in crontab. What’s the solution for > > > > this? > > > > > > Everywhere it matters, set an explicit PATH at the be

Re: auto restarting in crontab

2023-03-16 Thread Dan Ritter
tive shell, this may > > > break the ruby for sysadmin job in crontab. What’s the solution for > > > this? > > > > Everywhere it matters, set an explicit PATH at the beginning. > > > > There is no other solution. > > Err, I know nothing about the subject

Re: auto restarting in crontab

2023-03-16 Thread debian-user
Dan Ritter wrote: > p...@ymail.ne.jp wrote: > > For dev stuff, for example, I have many versions of ruby installed > > in the system by rbenv. > > > > Since I often change default ruby in interactive shell, this may > > break the ruby for sysadmin job in

Re: auto restarting in crontab

2023-03-16 Thread Jude DaShiell
6 Mar 2023, Dan Ritter wrote: > p...@ymail.ne.jp wrote: > > For dev stuff, for example, I have many versions of ruby installed in the > > system by rbenv. > > > > Since I often change default ruby in interactive shell, this may break the > > ruby for sysad

Re: auto restarting in crontab

2023-03-16 Thread Dan Ritter
p...@ymail.ne.jp wrote: > For dev stuff, for example, I have many versions of ruby installed in the > system by rbenv. > > Since I often change default ruby in interactive shell, this may break the > ruby for sysadmin job in crontab. What’s the solution for this? Everywhere

Re: Re: auto restarting in crontab

2023-03-16 Thread pyh
For dev stuff, for example, I have many versions of ruby installed in the system by rbenv. Since I often change default ruby in interactive shell, this may break the ruby for sysadmin job in crontab. What’s the solution for this?

Re: auto restarting in crontab

2023-03-16 Thread Nicolas George
Greg Wooledge (12023-03-16): > So they installed > parallel toolsets (commands including ps, echo, and so on) in two > different directories. Four: there is also /usr/xpg4/bin and /usr/xpg6/bin. Regards, -- Nicolas George

Re: auto restarting in crontab

2023-03-16 Thread Greg Wooledge
On Thu, Mar 16, 2023 at 01:57:26PM +0100, Christoph Brinkhaus wrote: > I think you are right. The only remaining argument for specifying the > complete path I have read about is as below. > There might be the situation with different binaries but similar > names. For example /usr/bin/nc is differen

Re: auto restarting in crontab

2023-03-16 Thread Christoph Brinkhaus
Am Thu, Mar 16, 2023 at 07:27:22AM -0400 schrieb Greg Wooledge: > On Thu, Mar 16, 2023 at 12:24:10PM +0100, Christoph Brinkhaus wrote: > > The environments of login shells and crontab can be different. This > > includes the path where to seek executables. Therefore it is good >

Re: auto restarting in crontab

2023-03-16 Thread Greg Wooledge
On Thu, Mar 16, 2023 at 12:24:10PM +0100, Christoph Brinkhaus wrote: > The environments of login shells and crontab can be different. This > includes the path where to seek executables. Therefore it is good > practice not to write just the name of the executable as nc but the > name w

Re: auto restarting in crontab

2023-03-16 Thread Christoph Brinkhaus
Am Thu, Mar 16, 2023 at 08:55:54AM +0800 schrieb cor...@free.fr: > Greetings, > > My script for monitoring Node.js app as follows. I put it in crontab for > auto-check and restart if failure. > > #!/bin/bash > > # scan the port > nc -z 127.0.0.1 3000 > > if

Re: auto restarting in crontab

2023-03-16 Thread Nicolas George
Greg Wooledge (12023-03-16): > That assumes you want to detach the process from its session in the > first place. It's NOT what you should do when running a managed > service, though. > > With a managed service, you don't want ANY of the old legacy "I want > to run a daemon from an interactive sh

Re: auto restarting in crontab

2023-03-16 Thread Greg Wooledge
On Thu, Mar 16, 2023 at 08:53:55AM +0100, Nicolas George wrote: > cor...@free.fr (12023-03-16): > > nohup serve -s /home/myUsername/workspace/xxx-frontend/build & > > What Greg said. Plus: > > Never use nohup. nohup should never have been invented, it is based on a > complete lack of understan

Re: auto restarting in crontab

2023-03-16 Thread Nicolas George
cor...@free.fr (12023-03-16): > nohup serve -s /home/myUsername/workspace/xxx-frontend/build & What Greg said. Plus: Never use nohup. nohup should never have been invented, it is based on a complete lack of understanding of how sessions and control terminal work. Instead: - use setsid to det

Re: auto restarting in crontab

2023-03-15 Thread coreyh
updated: Thanks for all your helps, especially @Greg and @Yong Now this systemd service has been enabled and just works. I put a file on /etc/systemd/system/xxx.service whose content as, [Unit] Description=xxx Front After=network.target [Service] Type=simple Restart=always RestartSec=5 User=cor

Re: auto restarting in crontab

2023-03-15 Thread Jeremy Ardley
On 16/3/23 12:09, p...@ymail.ne.jp wrote: Just for fun, I asked this question on ChatGPT, who gives the answers as follows. Q:  Please help generate a systemd configuration for Debian linux A: Sure, here's an example of a systemd configuration file for a Debian Linux service: Be very care

Re: auto restarting in crontab

2023-03-15 Thread p...@ymail.ne.jp
Just for fun, I asked this question on ChatGPT, who gives the answers as follows. Q: Please help generate a systemd configuration for Debian linux A: Sure, here's an example of a systemd configuration file for a Debian Linux service: ``` [Unit] Description=My Service After=network.target [

Re: auto restarting in crontab

2023-03-15 Thread p...@ymail.ne.jp
cor...@free.fr wrote: where will I setup this script for systemd job? any reference? You might look at this article as well. https://linuxhandbook.com/create-systemd-services/ Yong

Re: auto restarting in crontab

2023-03-15 Thread Greg Wooledge
gt; > > > #!/bin/sh > > PATH=/whatver/you/need > > while true; do > > serve -s /path/to/your/service > > sleep 5 > > done > > > > Then arrange for this script to be executed at boot time, and that's it. > > No background stuff, no

Re: auto restarting in crontab

2023-03-15 Thread coreyh
On 16/03/2023 09:32, Greg Wooledge wrote: On Wed, Mar 15, 2023 at 08:00:20PM -0500, Nicholas Geovanis wrote: On Wed, Mar 15, 2023, 7:56 PM wrote: > My script for monitoring Node.js app as follows. I put it in crontab for > auto-check and restart if failure. There's so much wron

Re: auto restarting in crontab

2023-03-15 Thread Greg Wooledge
On Wed, Mar 15, 2023 at 08:00:20PM -0500, Nicholas Geovanis wrote: > On Wed, Mar 15, 2023, 7:56 PM wrote: > > My script for monitoring Node.js app as follows. I put it in crontab for > > auto-check and restart if failure. There's so much wrong with that. If you want to m

Re: auto restarting in crontab

2023-03-15 Thread Nicholas Geovanis
On Wed, Mar 15, 2023, 7:56 PM wrote: > Greetings, > > My script for monitoring Node.js app as follows. I put it in crontab for > auto-check and restart if failure. > > #!/bin/bash > > # scan the port > nc -z 127.0.0.1 3000 > > if [ $? -eq 0 ];then >exit &

auto restarting in crontab

2023-03-15 Thread coreyh
Greetings, My script for monitoring Node.js app as follows. I put it in crontab for auto-check and restart if failure. #!/bin/bash # scan the port nc -z 127.0.0.1 3000 if [ $? -eq 0 ];then exit else killall node sleep 1 nohup serve -s /home/myUsername/workspace/xxx-frontend/build

Re: root crontab @reboot for loop fails

2022-07-16 Thread Nicolas George
Timothy M Butterworth (12022-07-16): > rc.local does not exist in Debian 11. "/etc/rc.local: No such file or > directory" should it be a file or a directory? rc.local is for compatibility with legacy admin practices. Somebody showed in this thread how it is implemented for systemd. In my opinion,

Re: root crontab @reboot for loop fails

2022-07-16 Thread Greg Wooledge
On Sat, Jul 16, 2022 at 12:06:38PM -0400, Timothy M Butterworth wrote: > rc.local does not exist in Debian 11. "/etc/rc.local: No such file or > directory" should it be a file or a directory? If you wish to use it, it must be a file, with execute permission, and with a valid shebang (#!/bin/sh).

Re: root crontab @reboot for loop fails

2022-07-16 Thread Timothy M Butterworth
On Fri, Jul 15, 2022 at 11:07 PM Greg Wooledge wrote: > On Sat, Jul 16, 2022 at 03:49:09AM +0100, Gareth Evans wrote: > > $ sudo crontab -l > > [...] > > @reboot for f in $(/usr/sbin/zfs list -t snap -o name|grep reboot); do > /usr/sbin/zfs destroy $f;done > > @rebo

Re: root crontab @reboot for loop fails

2022-07-16 Thread Gareth Evans
> On 16 Jul 2022, at 14:39, Anssi Saari wrote: > > Tixy writes: > >> rc.local is still run on the latest Debian stable. You need to make >> sure it's a proper executable, i.e. starts with a shebang like >> '#!/bin/sh' and the file has execute permissions. > > Yes and that's because the sys

Re: root crontab @reboot for loop fails

2022-07-16 Thread Anssi Saari
Tixy writes: > rc.local is still run on the latest Debian stable. You need to make > sure it's a proper executable, i.e. starts with a shebang like > '#!/bin/sh' and the file has execute permissions. Yes and that's because the systemd package contains the rc-local.service which just runs /etc/rc

Re: root crontab @reboot for loop fails

2022-07-16 Thread Greg Wooledge
On Sat, Jul 16, 2022 at 08:13:56AM +0100, Tixy wrote: > On Sat, 2022-07-16 at 05:30 +0100, Gareth Evans wrote: > > I was of the impression (which I think it is fair to say has been created) > > that systemd had done away with /etc/rc.local > > rc.local is still run on the latest Debian stable. Yo

Re: root crontab @reboot for loop fails

2022-07-16 Thread Greg Wooledge
On Sat, Jul 16, 2022 at 05:35:39AM +0100, Gareth Evans wrote: > On Sat 16 Jul 2022, at 05:30, Gareth Evans wrote: > > > Why isn't root's $PATH available to root crontab? ie. including the > > link /sbin -> /usr/sbin? > > By which I mean: why can

Re: root crontab @reboot for loop fails

2022-07-16 Thread Tixy
On Sat, 2022-07-16 at 05:30 +0100, Gareth Evans wrote: > I was of the impression (which I think it is fair to say has been created) > that systemd had done away with /etc/rc.local rc.local is still run on the latest Debian stable. You need to make sure it's a proper executable, i.e. starts with a

Re: root crontab @reboot for loop fails

2022-07-15 Thread Gareth Evans
On Sat 16 Jul 2022, at 05:30, Gareth Evans wrote: > Why isn't root's $PATH available to root crontab? ie. including the > link /sbin -> /usr/sbin? By which I mean: why can't root crontab do everything sudo can do? Thanks G

Re: root crontab @reboot for loop fails

2022-07-15 Thread Gareth Evans
lable to root crontab. Why isn't root's $PATH available to root crontab? ie. including the link /sbin -> /usr/sbin? > "All your crontab entries run in parallel. OK thanks. Is this documented? $ man crontab then /parallel [ie search for "parallel"] returns

Re: root crontab @reboot for loop fails

2022-07-15 Thread Greg Wooledge
On Sat, Jul 16, 2022 at 03:49:09AM +0100, Gareth Evans wrote: > $ sudo crontab -l > [...] > @reboot for f in $(/usr/sbin/zfs list -t snap -o name|grep reboot); do > /usr/sbin/zfs destroy $f;done > @reboot /usr/sbin/zfs snap -r rpool@reboot > > > Prepending "/usr/s

Re: root crontab @reboot for loop fails

2022-07-15 Thread Gareth Evans
$ sudo crontab -l [...] @reboot for f in $(/usr/sbin/zfs list -t snap -o name|grep reboot); do /usr/sbin/zfs destroy $f;done @reboot /usr/sbin/zfs snap -r rpool@reboot Prepending "/usr/sbin/" to "zfs" doesn't make a difference. Thanks, Gareth

root crontab @reboot for loop fails

2022-07-15 Thread Gareth Evans
Hello, $ sudo crontab -l | grep reboot [...] [1] @reboot sleep 10; nmcli c up [2] @reboot for f in $(zfs list -t snap -o name|grep reboot); do zfs destroy $f;done [3] @reboot zfs snap -r rpool@reboot [1] succeeds, but [2,3] do not. Any ideas why would be gratefully received. Many thanks

Re: MY crontab ain't me!

2020-12-21 Thread tomas
On Mon, Dec 21, 2020 at 12:26:28PM -0500, Gene Heskett wrote: > On Monday 21 December 2020 10:53:23 to...@tuxteam.de wrote: > > > On Mon, Dec 21, 2020 at 09:50:37AM -0500, Gene Heskett wrote: > > > On Monday 21 December 2020 09:18:45 to...@tuxteam.de wrote: > > > > [...] > > > > > > I feel dirty n

Re: MY crontab ain't me!

2020-12-21 Thread tomas
On Mon, Dec 21, 2020 at 10:04:48AM -0600, Nicholas Geovanis wrote: > On Mon, Dec 21, 2020, 8:19 AM wrote: > > > On Mon, Dec 21, 2020 at 03:09:32PM +0100, to...@tuxteam.de wrote: > > > > [environment variables and things] > > > > Wel, the DCOP docs are here [1] (Ah, Doxygen docs. Is there a > > te

Re: MY crontab ain't me!

2020-12-21 Thread Gene Heskett
On Monday 21 December 2020 10:53:23 to...@tuxteam.de wrote: > On Mon, Dec 21, 2020 at 09:50:37AM -0500, Gene Heskett wrote: > > On Monday 21 December 2020 09:18:45 to...@tuxteam.de wrote: > > [...] > > > > I feel dirty now. > > > > So do I, even that bow legged name generates ill feelings. Me and

Re: MY crontab ain't me!

2020-12-21 Thread Nicholas Geovanis
On Mon, Dec 21, 2020, 8:19 AM wrote: > On Mon, Dec 21, 2020 at 03:09:32PM +0100, to...@tuxteam.de wrote: > > [environment variables and things] > > Wel, the DCOP docs are here [1] (Ah, Doxygen docs. Is there a > term for "illiterate programming"?). > > The Jesus-freak spirit of Knuth rebuke

Re: MY crontab ain't me!

2020-12-21 Thread tomas
On Mon, Dec 21, 2020 at 09:50:37AM -0500, Gene Heskett wrote: > On Monday 21 December 2020 09:18:45 to...@tuxteam.de wrote: [...] > > I feel dirty now. > > So do I, even that bow legged name generates ill feelings. Me and my > printer both need a shower. But its better than nothing, and may >

Re: MY crontab ain't me!

2020-12-21 Thread Gene Heskett
On Monday 21 December 2020 09:18:45 to...@tuxteam.de wrote: > On Mon, Dec 21, 2020 at 03:09:32PM +0100, to...@tuxteam.de wrote: > > [environment variables and things] > > Wel, the DCOP docs are here [1] (Ah, Doxygen docs. Is there a > term for "illiterate programming"?). Convincing my search engin

Re: MY crontab ain't me!

2020-12-21 Thread tomas
On Mon, Dec 21, 2020 at 03:09:32PM +0100, to...@tuxteam.de wrote: [environment variables and things] Wel, the DCOP docs are here [1] (Ah, Doxygen docs. Is there a term for "illiterate programming"?). Convincing my search engine to search that site for "environment variable" yields some hits (e.g.

Re: MY crontab ain't me!

2020-12-21 Thread tomas
On Mon, Dec 21, 2020 at 08:42:26AM -0500, Gene Heskett wrote: > I got an email from cron this morning that needs some explaining. > Here is a dcop connand _I_ can execute, no error > /opt/trinity/bin/dcop kmail KMailIface resumeBackgroundJobs > > But I put it in MY crontab and

Re: MY crontab ain't me!

2020-12-21 Thread Greg Wooledge
On Mon, Dec 21, 2020 at 08:42:26AM -0500, Gene Heskett wrote: > I got an email from cron this morning that needs some explaining. > Here is a dcop connand _I_ can execute, no error > /opt/trinity/bin/dcop kmail KMailIface resumeBackgroundJobs > > But I put it in MY crontab and

MY crontab ain't me!

2020-12-21 Thread Gene Heskett
I got an email from cron this morning that needs some explaining. Here is a dcop connand _I_ can execute, no error /opt/trinity/bin/dcop kmail KMailIface resumeBackgroundJobs But I put it in MY crontab and get this email Cron /opt/trinity/bin/dcop kmail KMailIface resumeBackgroundJobs From

Re: Does Debian crontab support the @NumberOfSeconds scheduling syntax?

2019-08-18 Thread Judah Richardson
>> indicate that a task should be started n seconds after its previous > >> invocation completed. > > > >> I couldn't find anything like that in the Debian crontab > >> documentation. Is it supported or possible? > > > > This is not somet

Re: Does Debian crontab support the @NumberOfSeconds scheduling syntax?

2019-08-18 Thread Sven Joachim
find anything like that in the Debian crontab >> documentation. Is it supported or possible? > > This is not something Vixie cron in Debian supports. > > You could achieve something like this with systemd.timers though. To elaborate on that, systemd.timer(5) mentions the follo

Re: Does Debian crontab support the @NumberOfSeconds scheduling syntax?

2019-08-17 Thread Sven Hartge
Judah Richardson wrote: > In FreeBSD and derived OSes, you can use @n, where n is a number, to > indicate that a task should be started n seconds after its previous > invocation completed. > I couldn't find anything like that in the Debian crontab > documentation. Is it s

Does Debian crontab support the @NumberOfSeconds scheduling syntax?

2019-08-17 Thread Judah Richardson
In FreeBSD and derived OSes, you can use @n, where n is a number, to indicate that a task should be started n seconds after its previous invocation completed. I couldn't find anything like that in the Debian crontab documentation. Is it supported or possible?

Re: nother problem I can't access my crontab, no perms

2019-05-20 Thread Étienne Mollier
On 5/20/19 8:40 PM, Gene Heskett wrote: >> I would tend to believe that execution of "crontab" related >> commands will benefit from the proper UIDs when operating. On >> my machine, at the same working directory, I have: >> >> $ sudo ls -lR >>

Re: nother problem I can't access my crontab, no perms

2019-05-20 Thread Gene Heskett
On Monday 20 May 2019 02:21:20 pm Étienne Mollier wrote: > Good Day Gene, > > On coyote, /var/spool/cron contained: > > drwx-wx--T 2 root systemd-timesync 4096 Mar 31 09:15 crontabs > > ^^^ > You can't go through this "crontab" directory if you a

Re: nother problem I can't access my crontab, no perms

2019-05-20 Thread Étienne Mollier
Good Day Gene, On coyote, /var/spool/cron contained: > drwx-wx--T 2 root systemd-timesync 4096 Mar 31 09:15 crontabs ^^^ You can't go through this "crontab" directory if you are not root, or a member of the group systemd-timesync. That includes that you can

  1   2   3   4   5   6   7   >