A customer writes:
"We want to use the default cron set up with our Red Hat (/etc/cron.hourly, /etc/cron.daily). We have placed files in these directories and they work great. According to the Red Hat Sys Adm guide, we should be able to put files in the /etc/cron.d directory when we want to run them at times other than hourly, daily, weekly. I placed a test file in the /etc/cron.d dir that has the same format as cron. This file is set to run every 5 minutes. It does not run."
The clue there is the "has the same format as cron". Files put in cron.d have a similar format to normal cron jobs, but need one extra parameter. A "normal" crontab file might look like:
*/5 * * * * /usr/local/bin/myjob
but if it is to be put in cron.d it needs a user name before the actual command:
*/5 * * * * root /usr/local/bin/myjob
See Cron is not working also.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-03-18 Tony Lawrence
While we all ooh and ahh over the reports and graphs, Google is quietly building an incredible pile of extremely valuable information. (Tony Lawrence)