|
|
1.1 root 1:
2:
3: cron System Maintenance cron
4:
5:
6:
7:
8: Execute commands periodically
9:
10: /etc/cron&
11:
12: cron is a daemon that executes commands at preset times. The
13: commands and their scheduled execution times are kept in the file
14: /usr/lib/crontab.
15:
16: Once each minute cron searches through crontab. For each command
17: stored there, cron compares the current time with the scheduled
18: execution time and executes the command if the times match. When
19: it finishes the search, cron sleeps until the next minute.
20: Because it never exits, cron should be executed only once (cus-
21: tomarily by /etc/rc).
22:
23: crontab consists of lines separated by newlines. Each line con-
24: sists of six fields separated by white space (tabs or blanks).
25: The first five fields describe the scheduled execution time of
26: the command. Respectively, they represent the minute (0-59),
27: hour (0-23), day of the month (1-31), month of the year (1-12),
28: and day of the week (0-6, 0 indicates Sunday). Each field may
29: contain a single integer in the appropriate range, a pair of in-
30: tegers separated by a hyphen `-' (meaning all integers between
31: the two, inclusive), an asterisk `*' (meaning all legal values),
32: or a comma-separated list of the above forms. The remainder of
33: the line gives the command to be executed at the given time.
34:
35: For example, the ccrroonnttaabb entry
36:
37:
38: 29 * * 7 0 msg henry Succotash!
39:
40:
41: means that every hour on the half-hour during each Sunday in
42: July, ccrroonn will invoke the command mmssgg, and the user named hheennrryy
43: will have the message
44:
45:
46: daemon: Succotash!
47:
48:
49: written on his terminal's screen (if he is logged in).
50:
51: cron recognizes three special characters and escape sequences in
52: the crontab. If a command contains the percent character `%',
53: cron executes only the portion up to the first `%' as a command
54: and passes the remainder to the command as its standard input.
55: cron translates any percent characters `%' in the remainder to
56: newlines. The special interpretation of `%' can be prevented by
57: preceding it with a backslash, `\%'. Finally, cron removes the
58: sequence \<nneewwlliinnee> from the text before passing it to the shell
59: sh; this can be used to make an entry in the crontab more
60: legible.
61:
62:
63:
64: COHERENT Lexicon Page 1
65:
66:
67:
68:
69: cron System Maintenance cron
70:
71:
72:
73: cron is designed for commands that must be executed regularly.
74: Temporal commands that need to be executed only once should be
75: handled with the command at.
76:
77: ***** Files *****
78:
79: /uussrr/lliibb/ccrroonnttaabb for stored commands
80:
81: ***** See Also *****
82:
83: at, init, system maintenance
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130: COHERENT Lexicon Page 2
131:
132:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.