On 30 Jun 15:22, Srdjan Todorovic wrote:
On 30 June 2010 15:15, Jenny Hopkins hopkins.jenny@gmail.com wrote:
I've set up a script** to run from cron as below. This script runs from a terminal as it should, but won't run either from cron.d or from cron.hourly when stuffed in there. Can anyone see anything glaringly obviously wrong with it?
It's run as /etc/cron.d/update-ip, with the following line: */5 * * *
- root /bin/checkIP.sh
From the man page:
"The ``sixth'' field (the rest of the line) specifies the command to be run. "
Your sixth field is "root" -- is this what you intended?
Yes, it really was what she really meant...
Now... Miss Hopkins... Are you sure that it's not being executed? Can you do a grep "CRON" /var/log/syslog, see if it's executing at all, if not then I wonder if it's one of my *favourite* cron.d issues...
(oh, and that would *not* work in cron.daily, things in cron.daily are straight scripts).
Add a blank line at the end of the file...
Seriously.
Yes, I'm really not shitting you.
Cheers,