In this section, we consider several system facilities with which system administrators need to be intimately familiar.
cron is a Unix facility that
allows you to schedule programs for periodic execution. For example,
you can use
cron to call a
particular remote site every hour to exchange email, to clean up
editor backup files every night, to back up and then truncate system
log files once a month, or to perform any number of other tasks. Using
cron, administrative functions are
performed without any explicit action by the system administrator (or
any other user).
For administrative purposes,
cron is useful for running commands and
scripts according to a preset schedule.
cron can send the resulting output to a log
file, as a mail or terminal message, or to a different host for
centralized logging. The
command starts the
which has no options. It is normally started automatically by one of
the system initialization scripts.
Table 3-3 lists the
components of the
cron facility on
the various Unix systems we are considering. We will cover each of
them in the course of thissection.
Table 3-3. Variations on the cron facility
Location and information
FreeBSD: /var/cron/tabs, /etc/crontab
Linux: /var/spool/cron (Red Hat), /var/spool/cron/tabs (SuSE), /etc/crontab (both)
Usual: System V (no username field)
BSD: /etc/crontab ...