Cron is the Unix/Linux task scheduler. It uses crontab (cron table) files to specify the date and time that specific tasks are to be executed. The master system-wide crontab file is /etc/crontab; additional system-wide crontab files may be placed in /etc/cron.d, and personal crontab files (which are managed with the crontab command) are placed in /var/spool/cron/.
The name and value pairs at the start of this file set up exported environment variables. The remaining lines contain five date and time fields (minute, hour, day of the month, month of the year, and day of the week), the account name under which the command should be executed, and the name of the command. (Personal crontab files are installed with the crontab command and do not contain the account name field).
The run-parts script simply runs each of the scripts within the specified directory. One of the scripts in each of those directories is named 0anacron and is designed to update timestamp files stored in /var/spool/anacron; these timestamps are used by the anacron system at boot time to ensure that the daily, weekly, and hourly jobs still get executed even if the computer is never on between 4:00 and 5:00 am.
For example, an office system which is turned off by the user each evening and turned on at 9:00 am each morning will never be on at 4:22 am when the scripts in the /etc/cron.weekly directory are executed. One of the jobs performed weekly is makewhatis, which rebuilds the whatis database used by the apropos, man -k, and whatis commands, so those commands would never have access to an up-to-date index. To solve this problem, when the system is booted, the init script /etc/rc.d/init.d/anacron checks the file /var/spool/anacron/cron.weekly to see when the scripts in /etc/cron.weekly were last run; if it was more than 7 days ago, the scripts are executed after a brief delay using run-parts.
Packages that requires scheduled execution of jobs can be configued in either of two ways: they can include a crontab file which will be placed in /etc/cron.d (the approach used by the smolt package), or they can include a script file which will be placed in /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly, or /etc/cron.monthly (which is the approach used by cups).