doc -f and -n flags
[unix-history] / usr / src / usr.sbin / cron / cron.8
... / ...
CommitLineData
1.\" @(#)cron.8 6.4 (Berkeley) %G%
2.\"
3.TH CRON 8 ""
4.AT 3
5.SH NAME
6cron \- clock daemon
7.SH SYNOPSIS
8.B /etc/cron
9.SH DESCRIPTION
10.I Cron
11executes commands at specified dates and times
12according to the instructions in the files
13/usr/lib/crontab and /usr/lib/crontab.local.
14None, either one, or both of these files may be present.
15Since
16.I cron
17never exits,
18it should only be executed once.
19This is best done by running
20.I cron
21from the initialization
22process through the file
23/etc/rc;
24see
25.IR init (8).
26.PP
27The
28crontab files
29consist of lines of seven fields each.
30The fields are separated by spaces or tabs.
31The first five are integer patterns to specify:
32.in +2m
33.TP 2m
34\(bu
35minute (0-59)
36.nr .0 \n()Pu
37.nr )P 0
38.TP 2m
39\(bu
40hour (0-23)
41.TP 2m
42\(bu
43day of the month (1-31)
44.TP 2m
45\(bu
46month of the year (1-12)
47.TP 2m
48\(bu
49day of the week (1-7 with 1 = Monday)
50.nr )P \n(.0u
51.in -2m
52.LP
53Each of these patterns may contain:
54.in +2m
55.TP 2m
56\(bu
57a number in the range above
58.nr .0 \n()Pu
59.nr )P 0
60.TP 2m
61\(bu
62two numbers separated by a minus
63meaning a range inclusive
64.TP 2m
65\(bu
66a list of numbers separated by
67commas meaning any of the numbers
68.TP 2m
69\(bu
70an asterisk meaning all legal values
71.nr )P \n(.0u
72.in -2m
73.LP
74The sixth field is a user name: the
75command will be run ``as'' that user.
76The seventh field consists of all the text
77on a line following the sixth field,
78including spaces and tabs;
79this text is treated as a command
80which is executed by the Shell at the
81specified times.
82A percent character (``%'')
83in this field is translated to a new-line
84character.
85.PP
86Both
87crontab files are checked by
88.I cron
89every minute, on the minute.
90.SH FILES
91/usr/lib/crontab
92.br
93/usr/lib/crontab.local