On Mon, 9 Dec 2024, Greg Wooledge wrote:

On Mon, Dec 09, 2024 at 15:59:38 +0100, to...@tuxteam.de wrote:

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 ;-)

This is all correct.  You (Roger) should remove the username field from
the "crontab -e" variant.  Beyond that, if your command isn't working
when run from cron, you will need to read the output.  So get rid of
those redirections, and let it email the output to you.

I let cron e-mail me and saw a demonstration of what you predicted would happen if the username is specified.

E-mail with username specified:
  Subject: Cron <rprice@titan> rprice /mnt/home/rprice/bark/bark.sh   4
  /bin/bash: line 1: rprice: command not found

E-mail with no username
  Subject: Cron <rprice@titan> /mnt/home/rprice/bark/bark.sh   4
  Playing Sparc Audio '/mnt/home/rprice/bark/h4.au' : Mu-Law, Rate 8000 Hz, Mono

I have revised my "crontab -e" entirely, and I have once more the pleasure of hearing Biff bark the hours.

Thanks very much for your help, Roger

Reply via email to