Print this page
13066 Want crontab -u
Change-ID: I3dc2251dbbcc721aeff25a9dde21a24271c927bc
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1/crontab.1
+++ new/usr/src/man/man1/crontab.1
1 1 .\"
2 2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 3 .\" permission to reproduce portions of its copyrighted documentation.
4 4 .\" Original documentation from The Open Group can be obtained online at
5 5 .\" http://www.opengroup.org/bookstore/.
6 6 .\"
7 7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 8 .\" Group, have given us permission to reprint portions of their
9 9 .\" documentation.
10 10 .\"
11 11 .\" In the following statement, the phrase ``this text'' refers to portions
12 12 .\" of the system documentation.
13 13 .\"
14 14 .\" Portions of this text are reprinted and reproduced in electronic form
15 15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 16 .\" Standard for Information Technology -- Portable Operating System
17 17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 19 .\" Engineers, Inc and The Open Group. In the event of any discrepancy
20 20 .\" between these versions and the original IEEE and The Open Group
21 21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 22 .\" document. The original Standard can be obtained online at
23 23 .\" http://www.opengroup.org/unix/online.html.
24 24 .\"
25 25 .\" This notice shall appear on any product containing this material.
26 26 .\"
27 27 .\" The contents of this file are subject to the terms of the
28 28 .\" Common Development and Distribution License (the "License").
29 29 .\" You may not use this file except in compliance with the License.
30 30 .\"
31 31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 32 .\" or http://www.opensolaris.org/os/licensing.
33 33 .\" See the License for the specific language governing permissions
34 34 .\" and limitations under the License.
35 35 .\"
↓ open down ↓ |
35 lines elided |
↑ open up ↑ |
36 36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 38 .\" If applicable, add the following below this CDDL HEADER, with the
39 39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 41 .\"
42 42 .\"
43 43 .\" Copyright 1989 AT&T
44 44 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
45 45 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
46 -.\" Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
46 +.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
47 47 .\"
48 -.TH CRONTAB 1 "Oct 22, 2019"
48 +.TH CRONTAB 1 "Aug 20, 2020"
49 49 .SH NAME
50 50 crontab \- user crontab file
51 51 .SH SYNOPSIS
52 52 .nf
53 -\fB/usr/bin/crontab\fR [\fIfilename\fR]
53 +\fB/usr/bin/crontab\fR [\fB-u\fR \fIusername\fR] [\fIfilename\fR]
54 54 .fi
55 55
56 56 .LP
57 57 .nf
58 -\fB/usr/bin/crontab\fR \fB-e\fR [\fIusername\fR]
58 +\fB/usr/bin/crontab\fR \fB{ -e | -l | -r }\fR [\fIusername\fR]
59 59 .fi
60 60
61 61 .LP
62 62 .nf
63 -\fB/usr/bin/crontab\fR \fB-l\fR [\fIusername\fR]
63 +\fB/usr/bin/crontab\fR \fB-u\fR \fIusername\fR \fB{ -e | -l | -r }\fR
64 64 .fi
65 65
66 66 .LP
67 67 .nf
68 -\fB/usr/bin/crontab\fR \fB-r\fR [\fIusername\fR]
69 -.fi
70 -
71 -.LP
72 -.nf
73 68 \fB/usr/xpg4/bin/crontab\fR [\fIfilename\fR]
74 69 .fi
75 70
76 71 .LP
77 72 .nf
78 -\fB/usr/xpg4/bin/crontab\fR \fB-e\fR [\fIusername\fR]
73 +\fB/usr/xpg4/bin/crontab\fR \fB{ -e | -l | -r }\fR [\fIusername\fR]
79 74 .fi
80 75
81 76 .LP
82 77 .nf
83 -\fB/usr/xpg4/bin/crontab\fR \fB-l\fR [\fIusername\fR]
78 +\fB/usr/xpg4/bin/crontab\fR \fB-u\fR \fIusername\fR \fB{ -e | -l | -r }\fR
84 79 .fi
85 80
86 81 .LP
87 82 .nf
88 -\fB/usr/xpg4/bin/crontab\fR \fB-r\fR [\fIusername\fR]
89 -.fi
90 -
91 -.LP
92 -.nf
93 83 \fB/usr/xpg6/bin/crontab\fR [\fIfilename\fR]
94 84 .fi
95 85
96 86 .LP
97 87 .nf
98 -\fB/usr/xpg6/bin/crontab\fR \fB-e\fR [\fIusername\fR]
88 +\fB/usr/xpg6/bin/crontab\fR \fB{ -e | -l | -r }\fR [\fIusername\fR]
99 89 .fi
100 90
101 91 .LP
102 92 .nf
103 -\fB/usr/xpg6/bin/crontab\fR \fB-l\fR [\fIusername\fR]
93 +\fB/usr/xpg6/bin/crontab\fR \fB-u\fR \fIusername\fR \fB{ -e | -l | -r }\fR
104 94 .fi
105 95
106 -.LP
107 -.nf
108 -\fB/usr/xpg6/bin/crontab\fR \fB-r\fR [\fIusername\fR]
109 -.fi
110 -
111 96 .SH DESCRIPTION
112 97 The \fBcrontab\fR utility manages a user's access with \fBcron\fR (see
113 98 \fBcron\fR(1M)) by copying, creating, listing, and removing \fBcrontab\fR
114 99 files. If invoked without options, \fBcrontab\fR copies the specified file, or
115 100 the standard input if no file is specified, into a directory that holds all
116 101 users' crontabs.
117 102 .sp
118 103 .LP
119 104 If \fBcrontab\fR is invoked with \fIfilename\fR, this overwrites an existing
120 -\fBcrontab\fR entry for the user that invokes it.
105 +\fBcrontab\fR entry for the user that invokes it, or for the user specified
106 +with the \fB-u\fR option.
121 107 .SS "\fBcrontab\fR Access Control"
122 108 Users: Access to \fBcrontab\fR is allowed:
123 109 .RS +4
124 110 .TP
125 111 .ie t \(bu
126 112 .el o
127 113 if the user's name appears in \fB/etc/cron.d/cron.allow\fR.
128 114 .RE
129 115 .RS +4
130 116 .TP
131 117 .ie t \(bu
132 118 .el o
133 119 if \fB/etc/cron.d/cron.allow\fR does not exist and the user's name is not in
134 120 \fB/etc/cron.d/cron.deny\fR.
135 121 .RE
136 122 .sp
137 123 .LP
138 124 Users: Access to \fBcrontab\fR is denied:
139 125 .RS +4
140 126 .TP
141 127 .ie t \(bu
142 128 .el o
143 129 if \fB/etc/cron.d/cron.allow\fR exists and the user's name is not in it.
144 130 .RE
145 131 .RS +4
146 132 .TP
147 133 .ie t \(bu
148 134 .el o
149 135 if \fB/etc/cron.d/cron.allow\fR does not exist and user's name is in
150 136 \fB/etc/cron.d/cron.deny\fR.
151 137 .RE
152 138 .RS +4
153 139 .TP
154 140 .ie t \(bu
155 141 .el o
156 142 if neither file exists, only a user with the \fBsolaris.jobs.user\fR
157 143 authorization is allowed to submit a job.
158 144 .RE
159 145 .RS +4
160 146 .TP
161 147 .ie t \(bu
162 148 .el o
163 149 if Auditing is enabled, the user's shell is not audited and the user is
164 150 not the \fBcrontab\fR owner. This can occur if the user logs in by way of a
165 151 program, such as some versions of \fBSSH\fR, which does not set audit
166 152 parameters.
167 153 .RE
168 154 .sp
169 155 .LP
170 156 The rules for \fBallow\fR and \fBdeny\fR apply to \fBroot\fR only if the
171 157 \fBallow\fR/\fBdeny\fR files exist.
172 158 .sp
173 159 .LP
174 160 The \fBallow\fR/\fBdeny\fR files consist of one user name per line.
175 161 .SS "\fBcrontab\fR Entry Format"
176 162 A \fBcrontab\fR file consists of lines of six fields each. The fields are
177 163 separated by spaces or tabs. The first five are integer patterns that specify
178 164 the following:
179 165 .sp
180 166 .in +2
181 167 .nf
182 168 minute (0\(mi59),
183 169 hour (0\(mi23),
184 170 day of the month (1\(mi31),
185 171 month of the year (1\(mi12),
186 172 day of the week (0\(mi6 with 0=Sunday).
187 173 .fi
188 174 .in -2
189 175 .sp
190 176
191 177 .sp
192 178 .LP
193 179 Each of these patterns can be either an asterisk (meaning all legal values) or
194 180 a list of elements separated by commas. An element is either a number or two
195 181 numbers separated by a hyphen (meaning an inclusive range).
196 182 .LP
197 183 A range or asterisk can optionally be followed by a step value as
198 184 \fI/<number>\fR. For example, \fI2\(mi59/3\fR can be used in the minutes field
199 185 to specify every three minutes starting at 2 past the hour, or \fI*/2\fR in
200 186 the hours field means every two hours.
201 187 .LP
202 188 Time specified here is interpreted in the currently active timezone. At the top
203 189 of the crontab file this is the timezone which is set system-wide in
204 190 /etc/default/init. A user can add a line such as:
205 191 .sp
206 192 .in +2
207 193 .nf
208 194 TZ=\fItimezone\fR
209 195 .fi
210 196 .in -2
211 197 .sp
212 198
213 199 .sp
214 200 .LP
215 201 \&...and all subsequent entries will be interpreted using that timezone, until
216 202 a new \fBTZ=\fR\fItimezone\fR line is encountered. The specification of days
217 203 can be made by two fields (day of the month and day of the week). Both are
218 204 adhered to if specified as a list of elements. See \fBEXAMPLES\fR.
219 205 .sp
220 206 .LP
221 207 The sixth field of a line in a \fBcrontab\fR file is a string that is executed
222 208 by the shell at the specified times. A percent character in this field (unless
223 209 escaped by \fB\e\fR\|) is translated to a \fINEWLINE\fR character.
224 210 .sp
225 211 .LP
226 212 Only the first line (up to a \fB`\|%\|'\fR or end of line) of the command field
227 213 is executed by the shell. Other lines are made available to the command as
228 214 standard input. Any blank line or line beginning with a \fB`\|#\|'\fR is a
229 215 comment and is ignored.
230 216 .sp
231 217 .LP
232 218 The shell is invoked from your $HOME directory. As with $TZ, both $SHELL and
233 219 $HOME can be set by having a line such as:
234 220 .sp
235 221 .in +2
236 222 .nf
237 223 SHELL=/usr/bin/\fIsomeshell\fR
238 224 .fi
239 225 .in -2
240 226 .sp
241 227
242 228 .sp
243 229 .LP
244 230 \&...or:
245 231 .sp
246 232 .in +2
247 233 .nf
248 234 HOME=\fIsomedirectory\fR
249 235 .fi
250 236 .in -2
251 237 .sp
252 238
253 239 .sp
254 240 .LP
255 241 \&...which will take precedence for all the remaining entries in the
256 242 \fBcrontab\fR or until there is another \fBHOME\fR or \fBSHELL\fR entry. It is
257 243 invoked with an \fBarg0\fR of the basename of the $SHELL that is currently in
258 244 effect. A user who wants to have his \fB\&.profile\fR or equivalent file
259 245 executed must explicitly do so in the \fBcrontab\fR file. \fBcron\fR supplies
260 246 a default environment for every shell, defining HOME, LOGNAME, SHELL, TZ, and
261 247 PATH. The default PATH for user \fBcron\fR jobs is \fB/usr/bin\fR; while root
262 248 \fBcron\fR jobs default to \fB/usr/sbin:/usr/bin\fR. The default PATH can be
263 249 set in \fB/etc/default/cron\fR (see \fBcron\fR(1M)). The TZ, HOME, and SHELL
264 250 environment variables are set to match those that are in effect in the
↓ open down ↓ |
134 lines elided |
↑ open up ↑ |
265 251 \fBcrontab\fR file at the time.
266 252 .sp
267 253 .LP
268 254 If you do not redirect the standard output and standard error of your commands,
269 255 any generated output or errors are mailed to you.
270 256 .SS "\fBcrontab\fR Environment Variables"
271 257 The following variables are supported:
272 258 .sp
273 259 .ne 2
274 260 .na
275 -\fB\fBHOME\fR\fR
261 +\fBHOME\fR
276 262 .ad
277 263 .sp .6
278 264 .RS 4n
279 265 Allows the user to choose and alternative directory for cron to change
280 266 directory to prior to running the command. For example:
281 267 .sp
282 268 .in +2
283 269 .nf
284 270 HOME=/var/tmp
285 271 .fi
286 272 .in -2
287 273 .sp
288 274
289 275 .RE
290 276
291 277 .sp
292 278 .ne 2
293 279 .na
294 -\fB\fBSHELL\fR\fR
280 +\fBSHELL\fR
295 281 .ad
296 282 .sp .6
297 283 .RS 4n
298 284 The name of the shell to use to run subsequent commands. For example:
299 285 .sp
300 286 .in +2
301 287 .nf
302 288 SHELL=/usr/bin/ksh
303 289 .fi
304 290 .in -2
305 291 .sp
306 292
307 293 .RE
308 294
309 295 .sp
310 296 .ne 2
311 297 .na
312 -\fB\fBTZ\fR\fR
298 +\fBTZ\fR
313 299 .ad
314 300 .sp .6
315 301 .RS 4n
316 302 Allows the user to choose the timezone in which the \fBcron\fR entries are run.
317 303 This effects both the environment of the command that is run and the timing of
318 304 the entry. For example, to have your entries run using the timezone for
319 305 Iceland, use:
320 306 .sp
321 307 .in +2
322 308 .nf
323 309 TZ=Iceland
324 310 .fi
325 311 .in -2
326 312 .sp
327 313
328 314 .RE
329 315
330 316 .sp
331 317 .LP
332 318 Each of these variables affects all of the lines that follow it in the
333 319 \fBcrontab\fR file, until it is reset by a subsequent line resetting that
334 320 variable. Hence, it is possible to have multiple timezones supported within a
335 321 single \fBcrontab\fR file.
336 322 .sp
337 323 .LP
338 324 The lines that are not setting these environment variables are the same as
339 325 crontab entries that conform to the UNIX standard and are described elsewhere
340 326 in this man page.
341 327 .SS "Setting \fBcron\fR Jobs Across Timezones"
342 328 The default timezone of the \fBcron\fR daemon sets the system-wide timezone for
343 329 \fBcron\fR entries. This, in turn, is by set by default system-wide using
344 330 \fB/etc/default/init\fR.
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
345 331 .sp
346 332 .LP
347 333 If some form of \fBdaylight savings\fR or \fBsummer/winter time\fR is in
348 334 effect, then jobs scheduled during the switchover period could be executed
349 335 once, twice, or not at all.
350 336 .SH OPTIONS
351 337 The following options are supported:
352 338 .sp
353 339 .ne 2
354 340 .na
355 -\fB\fB-e\fR\fR
341 +\fB-e\fR
356 342 .ad
357 343 .RS 6n
358 344 Edits a copy of the current user's \fBcrontab\fR file, or creates an empty file
359 345 to edit if \fBcrontab\fR does not exist. When editing is complete, the file is
360 346 installed as the user's \fBcrontab\fR file.
361 347 .sp
362 348 The environment variable \fBEDITOR\fR determines which editor is invoked with
363 349 the \fB-e\fR option. All \fBcrontab\fR jobs should be submitted using
364 350 \fBcrontab\fR. Do not add jobs by just editing the \fBcrontab\fR file, because
365 351 \fBcron\fR is not aware of changes made this way.
366 352 .sp
367 353 If all lines in the \fBcrontab\fR file are deleted, the old \fBcrontab\fR file
368 354 is restored. The correct way to delete all lines is to remove the \fBcrontab\fR
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
369 355 file using the \fB-r\fR option.
370 356 .sp
371 357 If \fIusername\fR is specified, the specified user's \fBcrontab\fR file is
372 358 edited, rather than the current user's \fBcrontab\fR file. This can only be
373 359 done by root or by a user with the \fBsolaris.jobs.admin\fR authorization.
374 360 .RE
375 361
376 362 .sp
377 363 .ne 2
378 364 .na
379 -\fB\fB-l\fR\fR
365 +\fB-l\fR
380 366 .ad
381 367 .RS 6n
382 368 Lists the \fBcrontab\fR file for the invoking user. Only root or a user with
383 369 the \fBsolaris.jobs.admin\fR authorization can specify a username following the
384 370 \fB-l\fR option to list the \fBcrontab\fR file of the specified user.
385 371 .RE
386 372
387 373 .sp
388 374 .ne 2
389 375 .na
390 -\fB\fB-r\fR\fR
376 +\fB-r\fR
391 377 .ad
392 378 .RS 6n
393 379 Removes a user's \fBcrontab\fR from the \fBcrontab\fR directory. Only root or a
394 380 user with the \fBsolaris.jobs.admin\fR authorization can specify a username
395 381 following the \fB-r\fR option to remove the \fBcrontab\fR file of the specified
396 382 user.
397 383 .RE
398 384
385 +.sp
386 +.ne 2
387 +.na
388 +\fB-u\fR \fIusername\fR
389 +.ad
390 +.RS 6n
391 +Specifies the name of the user whose \fBcrontab\fR is to be replaced, viewed or
392 +modified. This can only be done by root or by a user with the
393 +\fBsolaris.jobs.admin\fR authorization.
394 +
395 +.RE
396 +
399 397 .SH EXAMPLES
400 398 \fBExample 1 \fRCleaning up Core Files
401 399 .sp
402 400 .LP
403 401 This example cleans up \fBcore\fR files every weekday morning at 3:15 am:
404 402
405 403 .sp
406 404 .in +2
407 405 .nf
408 406 \fB15 3 * * 1-5 find $HOME\fR \fB-name\fR\fBcore 2>/dev/null | xargs rm\fR \fB-f\fR
409 407 .fi
410 408 .in -2
411 409 .sp
412 410
413 411 .LP
414 412 \fBExample 2 \fRMailing a Birthday Greeting
415 413 .sp
416 414 .LP
417 415 This example mails a birthday greeting:
418 416
419 417 .sp
420 418 .in +2
421 419 .nf
422 420 \fB0 12 14 2 * mailx john%Happy Birthday!%Time for lunch.\fR
423 421 .fi
424 422 .in -2
425 423 .sp
426 424
427 425 .LP
428 426 \fBExample 3 \fRSpecifying Days of the Month and Week
429 427 .sp
430 428 .LP
431 429 This example runs a command on the first and fifteenth of each month, as well
432 430 as on every Monday:
433 431
434 432 .sp
435 433 .in +2
436 434 .nf
437 435 \fB0 0 1,15 * 1\fR
438 436 .fi
439 437 .in -2
440 438 .sp
441 439
442 440 .sp
443 441 .LP
444 442 To specify days by only one field, the other field should be set to *. For
445 443 example:
446 444
447 445 .sp
448 446 .in +2
449 447 .nf
450 448 \fB0 0 * * 1\fR
451 449 .fi
452 450 .in -2
453 451 .sp
454 452
455 453 .sp
456 454 .LP
457 455 would run a command only on Mondays.
458 456
459 457 .LP
460 458 \fBExample 4 \fRUsing step values:
461 459 .sp
462 460 .LP
463 461 This example runs a job every hour during the night and every 3 hours during
464 462 working hours.
465 463
466 464 .sp
467 465 .in +2
468 466 .nf
469 467 \fB0 8-18/3,19-7 * * *\fR
470 468 .fi
471 469 .in -2
472 470 .sp
473 471
474 472 .LP
475 473 and to run a job every 2 minutes, use:
476 474
477 475 .sp
478 476 .in +2
479 477 .nf
480 478 \fB*/2 * * * *\fR
481 479 .fi
482 480 .in -2
483 481 .sp
484 482
485 483 .LP
486 484 \fBExample 5 \fRUsing Environment Variables
487 485 .sp
488 486 .LP
489 487 The following entries take advantage of \fBcrontab\fR support for certain
490 488 environment variables.
491 489
492 490 .sp
493 491 .in +2
494 492 .nf
495 493 TZ=GMT
496 494 HOME=/local/home/user
497 495 SHELL=/usr/bin/ksh
498 496 0 0 * * * echo $(date) > midnight.GMT
499 497 TZ=PST
500 498 0 0 * * * echo $(date) > midnight.PST
501 499 TZ=EST
502 500 HOME=/local/home/myuser
503 501 SHELL=/bin/csh
504 502 .fi
505 503 .in -2
506 504 .sp
507 505
508 506 .sp
509 507 .LP
510 508 The preceding entries allow two jobs to run. The first one would run at
511 509 midnight in the GMT timezone and the second would run at midnight in the PST
512 510 timezone. Both would be run in the directory \fB/local/home/user\fR using the
↓ open down ↓ |
104 lines elided |
↑ open up ↑ |
513 511 Korn shell. The file concludes with \fBTZ\fR, \fBHOME\fR, and \fBSHELL\fR
514 512 entries that return those variable to their default values.
515 513
516 514 .SH ENVIRONMENT VARIABLES
517 515 See \fBenviron\fR(5) for descriptions of the following environment variables
518 516 that affect the execution of \fBcrontab\fR: \fBLANG\fR, \fBLC_ALL\fR,
519 517 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
520 518 .SS "\fB/usr/bin/crontab\fR"
521 519 .ne 2
522 520 .na
523 -\fB\fBEDITOR\fR\fR
521 +\fBEDITOR\fR
524 522 .ad
525 523 .RS 10n
526 524 Determine the editor to be invoked when the \fB-e\fR option is specified. This
527 525 is overridden by the \fBVISUAL\fR environmental variable. The default editor is
528 526 \fBvi\fR(1).
529 527 .RE
530 528
531 529 .sp
532 530 .ne 2
533 531 .na
534 -\fB\fBPATH\fR\fR
532 +\fBPATH\fR
535 533 .ad
536 534 .RS 10n
537 535 The \fBPATH\fR in \fBcrontab\fR's environment specifies the search path used to
538 536 find the editor.
539 537 .RE
540 538
541 539 .sp
542 540 .ne 2
543 541 .na
544 -\fB\fBVISUAL\fR\fR
542 +\fBVISUAL\fR
545 543 .ad
546 544 .RS 10n
547 545 Determine the visual editor to be invoked when the \fB-e\fR option is
548 546 specified. If \fBVISUAL\fR is not specified, then the environment variable
549 547 \fBEDITOR\fR is used. If that is not set, the default is \fBvi\fR(1).
550 548 .RE
551 549
552 550 .SS "\fB/usr/xpg4/bin/crontab\fR"
553 551 .ne 2
554 552 .na
555 -\fB\fBEDITOR\fR\fR
553 +\fBEDITOR\fR
556 554 .ad
557 555 .RS 10n
558 556 Determine the editor to be invoked when the \fB-e\fR option is specified. The
559 557 default editor is \fB/usr/xpg4/bin/vi\fR.
560 558 .RE
561 559
562 560 .SS "\fB/usr/xpg6/bin/crontab\fR"
563 561 .ne 2
564 562 .na
565 -\fB\fBEDITOR\fR\fR
563 +\fBEDITOR\fR
566 564 .ad
567 565 .RS 10n
568 566 Determine the editor to be invoked when the \fB-e\fR option is specified. The
569 567 default editor is \fB/usr/xpg6/bin/vi\fR.
570 568 .RE
571 569
572 570 .SH EXIT STATUS
573 571 The following exit values are returned:
574 572 .sp
575 573 .ne 2
576 574 .na
577 -\fB\fB0\fR\fR
575 +\fB0\fR
578 576 .ad
579 577 .RS 6n
580 578 Successful completion.
581 579 .RE
582 580
583 581 .sp
584 582 .ne 2
585 583 .na
586 -\fB\fB>0\fR\fR
584 +\fB>0\fR
587 585 .ad
588 586 .RS 6n
589 587 An error occurred.
590 588 .RE
591 589
592 590 .SH FILES
593 591 .ne 2
594 592 .na
595 -\fB\fB/etc/cron.d\fR\fR
593 +\fB/etc/cron.d\fR
596 594 .ad
597 595 .RS 28n
598 596 main cron directory
599 597 .RE
600 598
601 599 .sp
602 600 .ne 2
603 601 .na
604 -\fB\fB/etc/cron.d/cron.allow\fR\fR
602 +\fB/etc/cron.d/cron.allow\fR
605 603 .ad
606 604 .RS 28n
607 605 list of allowed users
608 606 .RE
609 607
610 608 .sp
611 609 .ne 2
612 610 .na
613 -\fB\fB/etc/default/cron\fR\fR
611 +\fB/etc/default/cron\fR
614 612 .ad
615 613 .RS 28n
616 614 contains cron default settings
617 615 .RE
618 616
619 617 .sp
620 618 .ne 2
621 619 .na
622 -\fB\fB/etc/cron.d/cron.deny\fR\fR
620 +\fB/etc/cron.d/cron.deny\fR
623 621 .ad
624 622 .RS 28n
625 623 list of denied users
626 624 .RE
627 625
628 626 .sp
629 627 .ne 2
630 628 .na
631 -\fB\fB/var/cron/log\fR\fR
629 +\fB/var/cron/log\fR
632 630 .ad
633 631 .RS 28n
634 632 accounting information
635 633 .RE
636 634
637 635 .sp
638 636 .ne 2
639 637 .na
640 -\fB\fB/var/spool/cron/crontabs\fR\fR
638 +\fB/var/spool/cron/crontabs\fR
641 639 .ad
642 640 .RS 28n
643 641 spool area for \fBcrontab\fR
644 642 .RE
645 643
646 644 .SH ATTRIBUTES
647 645 See \fBattributes\fR(5) for descriptions of the following attributes:
648 646 .SS "\fB/usr/bin/crontab\fR"
649 647
650 648 .TS
651 649 box;
652 650 c | c
653 651 l | l .
654 652 ATTRIBUTE TYPE ATTRIBUTE VALUE
655 653 _
656 654 Interface Stability Standard
657 655 .TE
658 656
659 657 .SS "\fB/usr/xpg4/bin/crontab\fR"
660 658
661 659 .TS
662 660 box;
663 661 c | c
664 662 l | l .
665 663 ATTRIBUTE TYPE ATTRIBUTE VALUE
666 664 _
667 665 Interface Stability Standard
668 666 .TE
669 667
670 668 .SS "\fB/usr/xpg6/bin/crontab\fR"
671 669
672 670 .TS
673 671 box;
674 672 c | c
675 673 l | l .
676 674 ATTRIBUTE TYPE ATTRIBUTE VALUE
677 675 _
678 676 Interface Stability Standard
679 677 .TE
680 678
681 679 .SH SEE ALSO
682 680 \fBatq\fR(1), \fBatrm\fR(1), \fBauths\fR(1), \fBed\fR(1), \fBsh\fR(1),
683 681 \fBvi\fR(1), \fBcron\fR(1M), \fBsu\fR(1M), \fBauth_attr\fR(4),
684 682 \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
685 683 .SH NOTES
686 684 If you inadvertently enter the \fBcrontab\fR command with no arguments, do not
687 685 attempt to get out with Control-d. This removes all entries in your
688 686 \fBcrontab\fR file. Instead, exit with Control-c.
689 687 .sp
690 688 .LP
691 689 When updating \fBcron\fR, check first for existing \fBcrontab\fR entries that
692 690 can be scheduled close to the time of the update. Such entries can be lost if
693 691 the update process completes after the scheduled event. This can happen
694 692 because, when \fBcron\fR is notified by \fBcrontab\fR to update the internal
695 693 view of a user's \fBcrontab\fR file, it first removes the user's existing
696 694 internal \fBcrontab\fR and any internal scheduled events. Then it reads the new
697 695 \fBcrontab\fR file and rebuilds the internal \fBcrontab\fR and events. This
698 696 last step takes time, especially with a large \fBcrontab\fR file, and can
699 697 complete \fBafter\fR an existing \fBcrontab\fR entry is scheduled to run if it
700 698 is scheduled too close to the update. To be safe, start a new job at least 60
701 699 seconds after the current date and time.
702 700 .sp
703 701 .LP
704 702 If an authorized user other than root modifies another user's \fBcrontab\fR
705 703 file, the resulting behavior can be unpredictable. Instead, the authorized user
706 704 should first use \fBsu\fR(1M) to become superuser to the other user's login
707 705 before making any changes to the \fBcrontab\fR file.
708 706 .sp
709 707 .LP
710 708 Care should be taken when adding \fBTZ\fR, \fBSHELL\fR and \fBHOME\fR variables
711 709 to the \fBcrontab\fR file when the \fBcrontab\fR file could be shared with
712 710 applications that do not expect those variables to be changed from the default.
713 711 Resetting the values to their defaults at the bottom of the file will minimize
714 712 the risk of problems.
↓ open down ↓ |
64 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX