]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/cron
Import sources from 2011-03-30 iso image - lib
[plan9front.git] / sys / man / 8 / cron
1 .TH CRON 8
2 .SH NAME
3 cron \- clock daemon
4 .SH SYNOPSIS
5 .B auth/cron
6 [
7 .B -c
8 ]
9 .SH DESCRIPTION
10 .I Cron
11 executes commands at specified dates and times according
12 to instructions in the files
13 .BI /cron/ user /cron\f1.
14 It runs only on an authentication server.
15 Option
16 .B -c
17 causes
18 .I cron
19 to create
20 .BI /cron/ user
21 and
22 .BI /cron/ user /cron
23 for the current user;
24 it can be run from any Plan 9 machine.
25 .PP
26 Blank lines and lines beginning with
27 .B #
28 in these files are ignored.
29 Entries are lines with fields
30 .IP
31 .I
32 minute hour day month weekday host command
33 .PP
34 .I Command
35 is a string, which may contain spaces, that is passed to an
36 .IR rc (1)
37 running on
38 .I host
39 for execution.
40 The first five fields are integer patterns for
41 .PD0
42 .RS
43 .TP \w'month\ of\ year\ \ 'u
44 minute
45 0\-59
46 .TP
47 hour
48 0\-23
49 .TP
50 day of month
51 1\-31
52 .TP
53 month of year
54 1\-12
55 .TP
56 day of week
57 0\-6; 0=Sunday
58 .PD
59 .RE
60 .PP
61 The syntax for these patterns is
62 .IP
63 .EX
64 time  : '*'
65       | range
66 range : number
67       | number '-' number
68       | range ',' range
69 .EE
70 .PP
71 Each number must be in the appropriate range.
72 Hyphens specify inclusive ranges of valid times;
73 commas specify lists of valid time ranges.
74 .PP
75 To run the job,
76 .I cron
77 calls
78 .I host
79 and authenticates remote execution, equivalent to running
80 .B rx
81 .I host
82 .I command
83 (see
84 .IR con (1)).
85 The user's profile is run with
86 .B $service
87 set to
88 .BR rx .
89 If
90 .I host
91 is
92 set to
93 .BR local ,
94 .I cron
95 will run the command as
96 .I user
97 on the local machine without using
98 .BR rx .
99 .PP
100 .I Cron
101 is not a reliable service.
102 It skips commands if it cannot reach
103 .I host
104 within two minutes, or if the
105 .I cron
106 daemon is
107 not running at the appropriate time.
108 .SH EXAMPLES
109 Here is the job that mails system news.
110 .IP
111 .EX
112 % cat /cron/upas/cron
113 # send system news
114 15 8-17,21 * * *        helix   /mail/lib/mailnews
115 %
116 .EE
117 .SH FILES
118 .TF /cron/lock
119 .TP
120 .B /cron/lock
121 lock file to prevent multiple
122 .IR cron s
123 running
124 .SH SOURCE
125 .B /sys/src/cmd/auth/cron.c
126 .SH "SEE ALSO"
127 .IR con (1),
128 .IR rc (1)