Making sense of cron in Centos and Fedora Linux


CentOS and Fedora Linux use a set of directories in /etc to control when jobs run. These directories take the following form:

/etc/cron.hourly - jobs that run once per hour
/etc/cron.daily - jobs that run once per day
/etc/cron.weekly - jobs that run one per week
/etc/cron.monthly - jobs that run once per month

To add a job to run hourly, daily, weekly or monthly, you can drop an executable shell script in the pertinent directory. I recently became curious which time of the day daily jobs execute, which day weekly jobs run, and when monthly jobs were scheduled. The answer to these questions comes in the way of /etc/crontab, which contains crontab formatted entries that call the run-parts script to invoke the scripts in the hourly, daily, weekly or monthly directory.

This article was posted by Matty on 2009-08-22 10:22:00 -0400 EDT