APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Cron job doesn't run


© March 2005 Tony Lawrence

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.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> Cron job doesn't run


Inexpensive and informative Apple related e-books:

Take Control of Automating Your Mac

Sierra: A Take Control Crash Course

Take Control of the Mac Command Line with Terminal, Second Edition

Photos: A Take Control Crash Course

Photos for Mac: A Take Control Crash Course




More Articles by © Tony Lawrence




Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





While we all ooh and ahh over the reports and graphs, Google is quietly building an incredible pile of extremely valuable information. (Tony Lawrence)




Linux posts

Troubleshooting posts


This post tagged:

Forum



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode





SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)
www.SCOsales.com