2 Working With cron
Use cron
to schedule jobs that run at fixed times, and as often as
every minute.
System cron
jobs are defined in the cron
table in the
/etc/crontab
configuration file, or in job files stored in the
/etc/cron.d
directory.
User defined cron
jobs are stored in the
/var/spool/cron
directory and include the user's name in the file name,
for example /var/spool/cron/jsmith
for the user
jsmith
.
The crond
daemon, which uses the cron
utility to run
scheduled jobs, checks those locations to decide which jobs need to run.
If the crond
daemon identifies a job that was configured to run in the
current minute, then the crond
daemon runs that job as the owner of the job
definition. If the job is a system cron
job, then the daemon runs the job as
the user that's specified in the job definition, if the user is defined.
If the system is down when a cron
job is scheduled to run then, when the
system is restarted, the daemon skips that job until the next scheduled run.