Typically /etc/crontab looks like:
Quote:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
The system crontab file looks almost identical to a user's crontab file, with a couple of subtle differences.
- The system crontab file is not stored in /var/spool/cron, and is not managed with the crontab command. Instead, the file is edited directly with a text editor.
- Entries contain an additional sixth field, which occurs after the five time specification fields but before the command. This field specifies the user the following command should run as (which is usually root).
The default /etc/crontab file comes with only four entries, each of which runs the command run-parts on one of the /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly, or /etc/cron.monthly directories. Sysadmins are free to add their own entries to the /etc/crontab file.