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