John Aldrich wrote:
>
> ...
>
> /etc/cron.daily/slocate.cron: line 6: syntax error: unexpected end of file
> /etc/cron.daily/wakeup.cron: 0: command not found
> /etc/cron.daily/wakeup.cron~: 0: command not found
> 
> Below is the cron job itself:
> # Cron script to (hopefully) play an MP3 file to wake me up in the mornings
> # at 6:00 AM Monday through Friday
> #
> 0 6 * * 1-5 /usr/bin/mpg123 "/home/john/taco-puttin_on_the_ritz.mp3"
> 
> Ok...my question is as follows: What the heck is the problem?


It looks to me like you've put the above cron config items into
/etc/cron.daily/wakeup.cron?  If so, this isn't the correct thing to do.

The files in /etc/cron.daily are scripts which are executed by cron
under the control of /etc/crontab.  What you have put in /etc/cron.daily
is a crontab, not a script!  Cron is trying to execute the command "0 6
* * 1-5 ..." and is complaining that there's no such command as "0".

What you need is a personal cron job in /var/spool/cron/john.  Remove
/etc/cron.daily/wakeup.cron, run (as user 'john') the command 'crontab
-e' and enter

0 6 * * 1-5 /usr/bin/mpg123 "/home/john/taco-puttin_on_the_ritz.mp3"

This will create /var/spool/cron/john.  Once a minute cron will look at
this and if the times match cron will run the mpg123 command.

Hope this makes sense...

[ And don't get up so early - you'll damage your brain :-) ]

Reply via email to