On Mon, Dec 09, 2024 at 03:24:06PM +0100, Roger Price wrote: > On Sun, 8 Dec 2024, Greg Wooledge wrote: > > > What line did you add to /etc/crontab? Please paste it here. Note > > that /etc/crontab uses a different format than personal crontab > > files (there's an extra username field). > > I added lines to /etc/crontab such as > > # Watch over the NUT heartbeat at 0803 hr every day > 3 8 * * * nut /usr/local/bin/heartbeat-watcher.sh > /dev/null 2>&1 > # Lets have Biff bark the hours > 0,1 0,12 * * * rprice /mnt/home/rprice/bark/bark.sh 12 > /dev/null 2>&1 > ... > 0,1 11,23 * * * rprice /mnt/home/rprice/bark/bark.sh 11 > /dev/null 2>&1 > > > That command edits your personal crontab file, which has the shorter > > lines (no username field is needed, because all the jobs are run as > > you). > > I added a username, but crontab -e didn't complain.
I still fear your crontab won't do what you expect it to do. Most probably cron will just see what you intended as a user name as part of the command: rprice /mnt/home/rprice/bark/bark.sh 11 > /dev/null 2>&1 will run the command "rprice" on the args "/mnt..."; most of the time this will be a "no such file or so-and-so", sometimes it might lead to surprising results ;-) And no, I don't think "crontab -e" will check whether that command exists. For a multitude of reasons (most of which can be subsumed under "the environment cron will run in isn't known when editing the tab"). Cheers -- t
signature.asc
Description: PGP signature