9.1 CRON: SCHEDULE COMMANDS

Under UNIX, periodic execution is handled by the cron daemon. cron starts when the system boots and remains running as long as the system is up. cron reads one or more configuration files containing lists of command lines and times at which they are to be invoked. The command lines are executed by sh, so almost anything you can do by hand from the shell can also be done via cron.2

A cron configuration file is called a “crontab,” short for “cron table.” All crontab files are stored in a single system directory, where cron knows to look for them. The crontab command transfers crontab files to and from this directory.

Typically, there is (at most) one crontab file per user: one for root, one for jsmith, and so on. Crontab ...

Get UNIX System Administration Handbook, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.