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