| @@ -1,256 +1,346 @@ | | | @@ -1,256 +1,346 @@ |
1 | .\" $NetBSD: crontab.5,v 1.12 2009/04/04 16:05:10 perry Exp $ | | 1 | .\" $NetBSD: crontab.5,v 1.13 2009/04/04 17:29:59 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\"/* Copyright 1988,1990,1993,1994 by Paul Vixie | | 3 | .\"/* Copyright 1988,1990,1993,1994 by Paul Vixie |
4 | .\" * All rights reserved | | 4 | .\" * All rights reserved |
5 | .\" * | | 5 | .\" * |
6 | .\" * Distribute freely, except: don't remove my name from the source or | | 6 | .\" * Distribute freely, except: don't remove my name from the source or |
7 | .\" * documentation (don't take credit for my work), mark your changes (don't | | 7 | .\" * documentation (don't take credit for my work), mark your changes (don't |
8 | .\" * get me blamed for your possible bugs), don't alter or remove this | | 8 | .\" * get me blamed for your possible bugs), don't alter or remove this |
9 | .\" * notice. May be sold if buildable source is provided to buyer. No | | 9 | .\" * notice. May be sold if buildable source is provided to buyer. No |
10 | .\" * warrantee of any kind, express or implied, is included with this | | 10 | .\" * warrantee of any kind, express or implied, is included with this |
11 | .\" * software; use at your own risk, responsibility for damages (if any) to | | 11 | .\" * software; use at your own risk, responsibility for damages (if any) to |
12 | .\" * anyone resulting from the use of this software rests entirely with the | | 12 | .\" * anyone resulting from the use of this software rests entirely with the |
13 | .\" * user. | | 13 | .\" * user. |
14 | .\" * | | 14 | .\" * |
15 | .\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and | | 15 | .\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and |
16 | .\" * I'll try to keep a version up to date. I can be reached as follows: | | 16 | .\" * I'll try to keep a version up to date. I can be reached as follows: |
17 | .\" * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul | | 17 | .\" * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul |
18 | .\" */ | | 18 | .\" */ |
19 | .\" | | 19 | .\" |
20 | .\" Id: crontab.5,v 2.4 1994/01/15 20:43:43 vixie Exp | | 20 | .\" Id: crontab.5,v 2.4 1994/01/15 20:43:43 vixie Exp |
21 | .\" | | 21 | .\" |
22 | .TH CRONTAB 5 "24 January 1994" | | 22 | .Dd April 4, 2009 |
23 | .UC 4 | | 23 | .Dt CRONTAB 5 |
24 | .SH NAME | | 24 | .Os |
25 | crontab \- tables for driving cron | | 25 | .Sh NAME |
26 | .SH DESCRIPTION | | 26 | .Nm crontab |
| | | 27 | .Nd tables for driving cron |
| | | 28 | .Sh DESCRIPTION |
27 | A | | 29 | A |
28 | .I crontab | | 30 | .Nm |
29 | file contains instructions to the | | 31 | file contains instructions to the |
30 | .IR cron (8) | | 32 | .Xr cron 8 |
31 | daemon of the general form: ``run this command at this time on this date''. | | 33 | daemon of the general form: |
32 | Each user has their own crontab, and commands in any given crontab will be | | 34 | .Dq run this command at this time on this date . |
33 | executed as the user who owns the crontab. Uucp and News will usually have | | 35 | Each user has their own crontab, and commands in any given crontab |
34 | their own crontabs, eliminating the need for explicitly running | | 36 | will be executed as the user who owns the crontab. |
35 | .IR su (1) | | 37 | Uucp and News will usually have their own crontabs, eliminating |
| | | 38 | the need for explicitly running |
| | | 39 | .Xr su 1 |
36 | as part of a cron command. | | 40 | as part of a cron command. |
37 | .PP | | 41 | .Pp |
38 | Blank lines and leading spaces and tabs are ignored. Lines whose first | | 42 | Blank lines and leading spaces and tabs are ignored. |
39 | non-space character is a pound-sign (#) are comments, and are ignored. | | 43 | Lines whose first non-space character is a pound-sign |
| | | 44 | .Pq Sq # |
| | | 45 | are comments, and are ignored. |
40 | Note that comments are not allowed on the same line as cron commands, since | | 46 | Note that comments are not allowed on the same line as cron commands, since |
41 | they will be taken to be part of the command. Similarly, comments are not | | 47 | they will be taken to be part of the command. |
| | | 48 | Similarly, comments are not |
42 | allowed on the same line as environment variable settings. | | 49 | allowed on the same line as environment variable settings. |
43 | .PP | | 50 | .Pp |
44 | An active line in a crontab will be either an environment setting or a cron | | 51 | An active line in a crontab will be either an environment setting |
45 | command. An environment setting is of the form, | | 52 | or a cron command. |
46 | .PP | | 53 | An environment setting is of the form, |
| | | 54 | .Bd -literal |
47 | name = value | | 55 | name = value |
48 | .PP | | 56 | .Ed |
49 | where the spaces around the equal-sign (=) are optional, and any subsequent | | 57 | where the spaces around the equal-sign |
50 | non-leading spaces in | | 58 | .Pq Sq = |
51 | .I value | | 59 | are optional, and any subsequent non-leading spaces in |
| | | 60 | .Ar value |
52 | will be part of the value assigned to | | 61 | will be part of the value assigned to |
53 | .IR name . | | 62 | .Ar name . |
54 | The | | 63 | The |
55 | .I value | | 64 | .Ar value |
56 | string may be placed in quotes (single or double, but matching) to preserve | | 65 | string may be placed in quotes (single or double, but matching) to |
57 | leading or trailing blanks. The | | 66 | preserve leading or trailing blanks. |
58 | .I name | | 67 | The |
59 | string may also be placed in quotes (single or double, but matching) to preserve | | 68 | .Ar name |
60 | leading, trailing or inner blanks. | | 69 | string may also be placed in quotes (single or double, but matching) |
61 | .PP | | 70 | to preserve leading, trailing or inner blanks. |
62 | Several environment variables are set up | | 71 | .Pp |
63 | automatically by the | | 72 | Several environment variables are set up automatically by the |
64 | .IR cron (8) | | 73 | .Xr cron 8 |
65 | daemon. | | 74 | daemon. |
66 | SHELL is set to /bin/sh, and LOGNAME and HOME are set from the /etc/passwd | | 75 | .Ev SHELL |
| | | 76 | is set to |
| | | 77 | .Pa /bin/sh , |
| | | 78 | and |
| | | 79 | .Ev LOGNAME |
| | | 80 | and |
| | | 81 | .Ev HOME |
| | | 82 | are set from the |
| | | 83 | .Pa /etc/passwd |
67 | line of the crontab's owner. | | 84 | line of the crontab's owner. |
68 | HOME and SHELL may be overridden by settings in the crontab; LOGNAME may not. | | 85 | .Ev HOME |
69 | .PP | | 86 | and |
70 | (Another note: the LOGNAME variable is sometimes called USER on BSD systems... | | 87 | .Ev SHELL |
71 | on these systems, USER will be set also.) | | 88 | may be overridden by settings in the crontab; |
72 | .PP | | 89 | .Ev LOGNAME |
73 | In addition to LOGNAME, HOME, and SHELL, | | 90 | may not. |
74 | .IR cron (8) | | 91 | .Pp |
75 | will look at MAILTO if it has any reason to send mail as a result of running | | 92 | (Another note: the |
76 | commands in ``this'' crontab. If MAILTO is defined (and non-empty), mail is | | 93 | .Ev LOGNAME |
77 | sent to the user so named. If MAILTO is defined but empty (MAILTO=""), no | | 94 | variable is sometimes called |
78 | mail will be sent. Otherwise mail is sent to the owner of the crontab. This | | 95 | .Ev USER |
79 | option is useful if you decide on /bin/mail instead of /usr/lib/sendmail as | | 96 | on BSD systems... on these systems, |
80 | your mailer when you install cron -- /bin/mail doesn't do aliasing, and UUCP | | 97 | .Ev USER |
81 | usually doesn't read its mail. | | 98 | will be set also.) |
82 | .PP | | 99 | .Pp |
| | | 100 | In addition to |
| | | 101 | .Ev LOGNAME , |
| | | 102 | .Ev HOME , |
| | | 103 | and |
| | | 104 | .Ev SHELL , |
| | | 105 | .Xr cron 8 |
| | | 106 | will look at |
| | | 107 | .Ev MAILTO |
| | | 108 | if it has any reason to send mail as a result of running commands in |
| | | 109 | .Dq this |
| | | 110 | crontab. |
| | | 111 | If |
| | | 112 | .Ev MAILTO |
| | | 113 | is defined (and non-empty), mail is sent to the user so named. |
| | | 114 | If |
| | | 115 | .Ev MAILTO |
| | | 116 | is defined but empty |
| | | 117 | .Pq Ev MAILTO Ns = Ns \&"" , |
| | | 118 | no mail will be sent. |
| | | 119 | Otherwise mail is sent to the owner of the crontab. |
| | | 120 | This option is useful if you decide on |
| | | 121 | .Xr mail 1 |
| | | 122 | instead of |
| | | 123 | .Xr sendmail 1 |
| | | 124 | as your mailer when you install cron -- |
| | | 125 | .Xr mail 1 |
| | | 126 | doesn't do aliasing, and UUCP usually doesn't read its mail. |
| | | 127 | .Pp |
83 | In order to provide finer control over when jobs execute, users | | 128 | In order to provide finer control over when jobs execute, users |
84 | can also set the environment variables CRON_TZ and CRON_WITHIN. | | 129 | can also set the environment variables |
85 | The CRON_TZ variable can be set to an alternate time zone in order | | 130 | .Ev CRON_TZ |
86 | to affect when the job is run. Note that this only affects the | | 131 | and |
87 | scheduling of the job, not the time zone that the job perceives | | 132 | .Ev CRON_WITHIN . |
88 | when it is run. If CRON_TZ is defined but empty (CRON_TZ=""), jobs | | 133 | The |
89 | are scheduled with respect to the local time zone. | | 134 | .Ev CRON_TZ |
90 | .PP | | 135 | variable can be set to an alternate time zone in order to affect |
91 | The CRON_WITHIN variable should indicate the number of seconds | | 136 | when the job is run. |
92 | within a job's scheduled time that it should still be run. On a | | 137 | Note that this only affects the scheduling of the job, not the time |
93 | heavily loaded system, or on a system that has just been "woken | | 138 | zone that the job perceives when it is run. |
94 | up", jobs will sometimes start later than originally intended, and | | 139 | If |
95 | by skipping non-critical jobs because of delays, system load can | | 140 | .Ev CRON_TZ |
96 | be lightened. If CRON_WITHIN is defined but empty (CRON_WITHIN="") or | | 141 | is defined but empty |
97 | set to some non-positive value (0, a negative number, or a non-numeric | | 142 | .Pq Ev CRON_TZ Ns = Ns \&"" , |
98 | string), it is treated as if it was unset. | | 143 | jobs are scheduled with respect to the local time zone. |
99 | .PP | | 144 | .Pp |
100 | The format of a cron command is very much the V7 standard, with a number of | | 145 | The |
101 | upward-compatible extensions. Each line has five time and date fields, | | 146 | .Ev CRON_WITHIN |
102 | followed by a user name if this is the system crontab file, | | 147 | variable should indicate the number of seconds within a job's |
103 | followed by a command. Commands are executed by | | 148 | scheduled time that it should still be run. |
104 | .IR cron (8) | | 149 | On a heavily loaded system, or on a system that has just been |
105 | when the minute, hour, and month of year fields match the current time, | | 150 | .Dq woken up , |
106 | .I and | | 151 | jobs will sometimes start later than originally intended, and by |
| | | 152 | skipping non-critical jobs because of delays, system load can be |
| | | 153 | lightened. |
| | | 154 | If |
| | | 155 | .Ev CRON_WITHIN |
| | | 156 | is defined but empty |
| | | 157 | .Pa Ev CRON_WITHIN Ns = Ns \&"" |
| | | 158 | or set to some non-positive value (0, a negative number, or a |
| | | 159 | non-numeric string), it is treated as if it was unset. |
| | | 160 | .Pp |
| | | 161 | The format of a cron command is very much the V7 standard, with a |
| | | 162 | number of upward-compatible extensions. |
| | | 163 | Each line has five time and date fields, followed by a user name |
| | | 164 | if this is the system crontab file, followed by a command. |
| | | 165 | Commands are executed by |
| | | 166 | .Xr cron 8 |
| | | 167 | when the minute, hour, and month of year fields match the current |
| | | 168 | time, |
| | | 169 | .Em and |
107 | when at least one of the two day fields (day of month, or day of week) | | 170 | when at least one of the two day fields (day of month, or day of week) |
108 | match the current time (see ``Note'' below). | | 171 | match the current time (see |
109 | .IR cron (8) | | 172 | .Dq Note |
| | | 173 | below). |
| | | 174 | .Xr cron 8 |
110 | examines cron entries once every minute. | | 175 | examines cron entries once every minute. |
111 | The time and date fields are: | | 176 | The time and date fields are: |
112 | .IP | | 177 | .Bl -column -offset indent "day of month" "0-7 (0 or 7 is Sun, or use names)" |
113 | .ta 1.5i | | 178 | .It Em field Ta Em allowed values |
114 | field allowed values | | 179 | .It minute Ta 0-59 |
115 | .br | | 180 | .It hour Ta 0-23 |
116 | ----- -------------- | | 181 | .It day of month Ta 1-31 |
117 | .br | | 182 | .It month Ta 1-12 (or names, see below) |
118 | minute 0-59 | | 183 | .It day of week Ta 0-7 (0 or 7 is Sun, or use names) |
119 | .br | | 184 | .El |
120 | hour 0-23 | | 185 | .Pp |
121 | .br | | 186 | A field may be an asterisk |
122 | .\" changed from 0-31 to 1-31: mouse, 1997-07-13 | | 187 | .Pq Sq * , |
123 | day of month 1-31 | | 188 | which always stands for |
124 | .br | | 189 | .Dq first\-last . |
125 | .\" changed from 0-12 to 1-12: mouse, 1997-07-13 | | 190 | .Pp |
126 | month 1-12 (or names, see below) | | 191 | Ranges of numbers are allowed. |
127 | .br | | 192 | Ranges are two numbers separated with a hyphen. |
128 | day of week 0-7 (0 or 7 is Sun, or use names) | | 193 | The specified range is inclusive. |
129 | .br | | 194 | For example, |
130 | .PP | | 195 | .Dq 8-11 |
131 | A field may be an asterisk (*), which always stands for ``first\-last''. | | 196 | for an |
132 | .PP | | 197 | .Dq hours |
133 | Ranges of numbers are allowed. Ranges are two numbers separated | | 198 | entry specifies execution at hours 8, 9, 10, and 11. |
134 | with a hyphen. The specified range is inclusive. For example, | | 199 | .Pp |
135 | 8-11 for an ``hours'' entry specifies execution at hours 8, 9, 10 | | 200 | A field may begin with a question mark |
136 | and 11. | | 201 | .Pq Sq ? , |
137 | .PP | | 202 | which indicates a single value randomly selected when the crontab |
138 | A field may begin with a question mark (?), which indicates a | | 203 | file is read. |
139 | single value randomly selected when the crontab file is read. | | | |
140 | If the field contains only a question mark, the value is randomly | | 204 | If the field contains only a question mark, the value is randomly |
141 | selected from the range of all possible values for the field. | | 205 | selected from the range of all possible values for the field. |
142 | If the question mark precedes a range, the value is randomly selected | | 206 | If the question mark precedes a range, the value is randomly selected |
143 | from the range. | | 207 | from the range. |
144 | For example, ``? ?2-5 * * *'' specifies that a task will be performed | | 208 | For example, |
145 | daily between 2:00am and and 5:59am at a time randomly selected when | | 209 | .Dq ? ?2-5 * * * |
146 | the crontab file is first read. | | 210 | specifies that a task will be performed daily between 2:00am and |
| | | 211 | and 5:59am at a time randomly selected when the crontab file is |
| | | 212 | first read. |
147 | As just one example, this feature can be used to prevent a large | | 213 | As just one example, this feature can be used to prevent a large |
148 | number of hosts from contacting a server simultaneously and | | 214 | number of hosts from contacting a server simultaneously and |
149 | overloading it by staggering the time at which a download script is | | 215 | overloading it by staggering the time at which a download script |
150 | executed. | | 216 | is executed. |
151 | .PP | | 217 | .Pp |
152 | Lists are allowed. A list is a set of numbers (or ranges) | | 218 | Lists are allowed. |
153 | separated by commas. Examples: ``1,2,5,9'', ``0-4,8-12''. | | 219 | A list is a set of numbers (or ranges) separated by commas. |
154 | .PP | | 220 | Examples: |
155 | Step values can be used in conjunction with ranges. Following | | 221 | .Dq 1,2,5,9 , |
156 | a range with ``/\*[Lt]number\*[Gt]'' specifies skips of the number's value | | 222 | .Dq 0-4,8-12 . |
157 | through the range. For example, ``0-23/2'' can be used in the hours | | 223 | .Pp |
158 | field to specify command execution every other hour (the alternative | | 224 | Step values can be used in conjunction with ranges. |
159 | in the V7 standard is ``0,2,4,6,8,10,12,14,16,18,20,22''). Steps are | | 225 | Following a range with |
160 | also permitted after an asterisk, so if you want to say ``every two | | 226 | .Dq / Ns Aq number |
161 | hours'', just use ``*/2''. | | 227 | specifies skips of the number's value through the range. |
162 | .PP | | 228 | For example, |
163 | Names can also be used for the ``month'' and ``day of week'' | | 229 | .Dq 0-23/2 |
164 | fields. Use the first three letters of the particular | | 230 | can be used in the hours field to specify command execution every |
165 | day or month (case doesn't matter). Ranges or | | 231 | other hour (the alternative in the V7 standard is |
166 | lists of names are not allowed. | | 232 | .Dq 0,2,4,6,8,10,12,14,16,18,20,22 ) . |
167 | .PP | | 233 | Steps are also permitted after an asterisk, so if you want to say |
168 | The ``sixth'' field (the rest of the line) specifies the command to be | | 234 | .Dq every two hours , |
169 | run. | | 235 | just use |
170 | The entire command portion of the line, up to a newline or % | | 236 | .Dq */2 . |
171 | character, will be executed by /bin/sh or by the shell | | 237 | .Pp |
172 | specified in the SHELL variable of the cronfile. | | 238 | Names can also be used for the |
173 | Percent-signs (%) in the command, unless escaped with backslash | | 239 | .Dq month |
174 | (\\), will be changed into newline characters, and all data | | 240 | and |
175 | after the first % will be sent to the command as standard | | 241 | .Dq day of week |
176 | input. | | 242 | fields. |
177 | .PP | | 243 | Use the first three letters of the particular day or month (case |
178 | Note: The day of a command's execution can be specified by two | | 244 | doesn't matter). |
179 | fields \(em day of month, and day of week. If both fields are | | 245 | Ranges or lists of names are not allowed. |
180 | restricted (ie, aren't *), the command will be run when | | 246 | .Pp |
181 | .I either | | 247 | The |
182 | field matches the current time. For example, | | 248 | .Dq sixth |
183 | .br | | 249 | field (the rest of the line) specifies the command to be run. |
184 | ``30 4 1,15 * 5'' | | 250 | The entire command portion of the line, up to a newline or percent |
185 | would cause a command to be run at 4:30 am on the 1st and 15th of each | | 251 | signs |
186 | month, plus every Friday. | | 252 | .Pq Sq % , |
187 | .\" Everything from here to .SH EXAMPLE CRON FILE added: mouse, 1997-07-13 | | 253 | will be executed by |
188 | .PP | | 254 | .Xr sh 1 |
| | | 255 | or by the shell specified in the |
| | | 256 | .Ev SHELL |
| | | 257 | variable of the cronfile. |
| | | 258 | Percent signs |
| | | 259 | .Pq Sq % |
| | | 260 | in the command, unless escaped with backslash |
| | | 261 | .Pq Sq \e , |
| | | 262 | will be changed into newline characters, and all data after the |
| | | 263 | first % will be sent to the command as standard input. |
| | | 264 | .Pp |
| | | 265 | .Em Note : |
| | | 266 | The day of a command's execution can be specified by two fields |
| | | 267 | \(em day of month, and day of week. |
| | | 268 | If both fields are restricted (i.e., aren't *), the command will |
| | | 269 | be run when |
| | | 270 | .Em either |
| | | 271 | field matches the current time. |
| | | 272 | For example, |
| | | 273 | .Dq 30 4 1,15 * 5 |
| | | 274 | would cause a command to be run at 4:30 am on the 1st and 15th of |
| | | 275 | each month, plus every Friday. |
| | | 276 | .Pp |
189 | Instead of the first five fields, one of eight special strings may appear: | | 277 | Instead of the first five fields, one of eight special strings may appear: |
190 | .IP | | 278 | .Bl -column -offset indent "@annually" "Run once a month, 0 0 1 * *." |
191 | .ta 1.5i | | 279 | .It Sy string Ta Sy meaning |
192 | string meaning | | 280 | .It @reboot Ta Run once, at startup. |
193 | .br | | 281 | .It @yearly Ta Run once a year, Dq 0 0 1 1 * . |
194 | ------ ------- | | 282 | .It @annually Ta (same as @yearly) |
195 | .br | | 283 | .It @monthly Ta Run once a month, Dq 0 0 1 * * . |
196 | @reboot Run once, at startup. | | 284 | .It @weekly Ta Run once a week, Dq 0 0 * * 0 . |
197 | .br | | 285 | .It @daily Ta Run once a day, Dq 0 0 * * * . |
198 | @yearly Run once a year, "0 0 1 1 *". | | 286 | .It @midnight Ta (same as @daily) |
199 | .br | | 287 | .It @hourly Ta Run once an hour, Dq 0 * * * * . |
200 | @annually (same as @yearly) | | 288 | .El |
201 | .br | | 289 | .Ss EXAMPLE CRON FILE |
202 | @monthly Run once a month, "0 0 1 * *". | | 290 | .Bd -literal |
203 | .br | | | |
204 | @weekly Run once a week, "0 0 * * 0". | | | |
205 | .br | | | |
206 | @daily Run once a day, "0 0 * * *". | | | |
207 | .br | | | |
208 | @midnight (same as @daily) | | | |
209 | .br | | | |
210 | @hourly Run once an hour, "0 * * * *". | | | |
211 | .br | | | |
212 | .SH EXAMPLE CRON FILE | | | |
213 | .nf | | | |
214 | | | | |
215 | # use /bin/sh to run commands, no matter what /etc/passwd says | | 291 | # use /bin/sh to run commands, no matter what /etc/passwd says |
216 | SHELL=/bin/sh | | 292 | SHELL=/bin/sh |
217 | # mail any output to `paul', no matter whose crontab this is | | 293 | # mail any output to `paul', no matter whose crontab this is |
218 | MAILTO=paul | | 294 | MAILTO=paul |
219 | # | | 295 | # |
220 | # run five minutes after midnight, every day | | 296 | # run five minutes after midnight, every day |
221 | 5 0 * * * $HOME/bin/daily.job \*[Gt]\*[Gt] $HOME/tmp/out 2\*[Gt]\*[Am]1 | | 297 | 5 0 * * * $HOME/bin/daily.job \*[Gt]\*[Gt] $HOME/tmp/out 2\*[Gt]\*[Am]1 |
222 | # run at 2:15pm on the first of every month -- output mailed to paul | | 298 | # run at 2:15pm on the first of every month -- output mailed to paul |
223 | 15 14 1 * * $HOME/bin/monthly | | 299 | 15 14 1 * * $HOME/bin/monthly |
224 | # run at 10 pm on weekdays, annoy Joe | | 300 | # run at 10 pm on weekdays, annoy Joe |
225 | 0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?% | | 301 | 0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?% |
226 | 23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday" | | 302 | 23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday" |
227 | 5 4 * * sun echo "run at 5 after 4 every sunday" | | 303 | 5 4 * * sun echo "run at 5 after 4 every sunday" |
228 | ? ?2-4 1,15 * * echo "random between 2am-4:59am on the 1st and 15th" | | 304 | ? ?2-4 1,15 * * echo "random between 2am-4:59am on the 1st and 15th" |
229 | .fi | | 305 | .Ed |
230 | .SH SEE ALSO | | 306 | .Sh SEE ALSO |
231 | cron(8), crontab(1) | | 307 | .Xr crontab 1 , |
232 | .SH EXTENSIONS | | 308 | .Xr cron 8 |
233 | When specifying day of week, both day 0 and day 7 will be considered Sunday. | | 309 | .Sh STANDARDS |
| | | 310 | When specifying day of week, both day 0 and day 7 will be considered |
| | | 311 | Sunday. |
234 | BSD and ATT seem to disagree about this. | | 312 | BSD and ATT seem to disagree about this. |
235 | .PP | | 313 | .Pp |
236 | Lists and ranges are allowed to co-exist in the same field. "1-3,7-9" would | | 314 | Lists and ranges are allowed to co-exist in the same field. |
237 | be rejected by ATT or BSD cron -- they want to see "1-3" or "7,8,9" ONLY. | | 315 | .Dq 1-3,7-9 |
238 | .PP | | 316 | would be rejected by ATT or BSD cron -- they want to see |
239 | Ranges can include "steps", so "1-9/2" is the same as "1,3,5,7,9". | | 317 | .Dq 1-3 |
240 | .PP | | 318 | or |
| | | 319 | .Dq 7,8,9 |
| | | 320 | ONLY. |
| | | 321 | .Pp |
| | | 322 | Ranges can include |
| | | 323 | .Dq steps , |
| | | 324 | so |
| | | 325 | .Dq 1-9/2 |
| | | 326 | is the same as |
| | | 327 | .Dq 1,3,5,7,9 . |
| | | 328 | .Pp |
241 | Names of months or days of the week can be specified by name. | | 329 | Names of months or days of the week can be specified by name. |
242 | .PP | | 330 | .Pp |
243 | Environment variables can be set in the crontab. In BSD or ATT, the | | 331 | Environment variables can be set in the crontab. |
244 | environment handed to child processes is basically the one from /etc/rc. | | 332 | In BSD or ATT, the environment handed to child processes is basically |
245 | .PP | | 333 | the one from |
246 | Command output is mailed to the crontab owner (BSD can't do this), can be | | 334 | .Pa /etc/rc . |
247 | mailed to a person other than the crontab owner (SysV can't do this), or the | | 335 | .Pp |
248 | feature can be turned off and no mail will be sent at all (SysV can't do this | | 336 | Command output is mailed to the crontab owner (BSD can't do this), |
249 | either). | | 337 | can be mailed to a person other than the crontab owner (SysV can't |
250 | .\" This next paragraph added: mouse, 1997-07-13 | | 338 | do this), or the feature can be turned off and no mail will be sent |
251 | .PP | | 339 | at all (SysV can't do this either). |
252 | All of the `@' commands that can appear in place of the first five fields | | 340 | .Pp |
253 | are extensions. | | 341 | All of the |
254 | .SH AUTHOR | | 342 | .Sq @ |
255 | .nf | | 343 | commands that can appear in place of the first five fields are |
256 | Paul Vixie \*[Lt]paul@vix.com\*[Gt] | | 344 | extensions. |
| | | 345 | .Sh AUTHORS |
| | | 346 | .An Paul Vixie Aq paul@vix.com |