66 lines
1.1 KiB
Plaintext
66 lines
1.1 KiB
Plaintext
|
|
|
|
|
|
|
|
|
|
Command: cron - clock daemon
|
|
Syntax: cron
|
|
Flags: (none)
|
|
Example: /usr/bin/cron # Use absolute path in /etc/rc
|
|
|
|
Cron is clock daemon. It is typically started up by including the
|
|
command /usr/bin/cron in the /etc/rc file. Once started, cron puts
|
|
itself in the background, so no & is needed. It runs forever, sleeping
|
|
most of the time. Once a minute it wakes up and examines
|
|
/usr/lib/crontab to see if there is any work to do. If there is, the
|
|
work is done. The entries of /usr/lib/crontab contain 6 elements each.
|
|
Some examples follow:
|
|
|
|
Min Hr Dat Mo Day Command
|
|
* * * * * /usr/bin/date >/dev/log #print date every minute
|
|
0 * * * * /usr/bin/date >/dev/log #print date on the hour
|
|
30 4 * * 1-5 /bin/backup /dev/fd1 #do backup Mon-Fri at
|
|
0430
|
|
30 19 * * 1,3,5 /etc/backup /dev/fd1 #Mon, Wed, Fri at 1930
|
|
0 9 25 12 * /usr/bin/sing >/dev/log #Xmas morning at 0900
|
|
only
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|