CRON(1M) — Silicon Graphics
NAME
cron − clock daemon
SYNOPSIS
/etc/cron
DESCRIPTION
Cron executes commands at specified dates and times according to the instructions in the file /usr/lib/crontab. Because cron never exits, it should be executed only once. This is best done by running cron from the initialization process through the file /etc/rc (see init(1M)).
The file crontab consists of lines of six fields each. The fields are separated by spaces or tabs. The first five are integer patterns that specify in order:
minute (0-59),
hour (0-23),
day of the month (1-31),
month of the year (1-12),
and day of the week (0-6, with 0=Sunday).
Each of these patterns may contain:
a number in the (respective) range indicated above;
two numbers separated by a minus (indicating an inclusive range);
a list of numbers separated by commas (meaning all of these numbers); or
an asterisk (meaning all legal values).
The sixth field is a string that is executed by the shell at the specified time(s). A % in this field is translated into a new-line character. Only the first line (up to a % or the end of line) of the command field is executed by the shell. The other lines are made available to the command as standard input. A \% yields %; \\ yields \. A newline preceded with a backslash and any following blanks or tabs are stripped out. Other occurences of \ are removed.
Cron examines crontab once a minute to see if it has changed; if it has, cron reads it. Thus it takes only a minute for entries to become effective.
EXAMPLE
If the shell file /etc/rc contains the command line
/etc/cron
the clock daemon will be started every time /etc/rc is invoked, i.e., each time the system goes into multi-user mode after booting.
FILES
/usr/lib/crontab
/usr/adm/cronlog
SEE ALSO
DIAGNOSTICS
A history of all actions by cron are recorded in /usr/adm/cronlog.
BUGS
Cron reads crontab only when it has changed, but it reads the in-core version of that table once a minute. A more efficient algorithm could be used. The overhead in running cron is about one percent of the CPU, exclusive of any commands executed by cron. Revision 1.0 85/05/01 16:33:03 robinf Initial Revision
Version 2.3 — July 04, 1985