6 .Nd run a command at a particular time
26 waits until a particular time and then runs a command.
27 Together with a service supervision system such as
29 this can be used to replace
32 The options are as follows:
35 Dry run: print the next 5 times the command would run and exit.
37 Verbose: print scheduled (and rescheduled) times.
42 Delay determination of scheduled time randomly up to
46 Delay execution randomly up to
48 seconds later than scheduled time.
50 Commands are executed even if they are
52 (default: 60) seconds late.
61 are parsed as seconds,
70 The remaining arguments are patterns for the time fields:
72 .Bl -tag -compact -width xxxxxxxxxx
78 weekday (0-7, sunday is 0 and 7)
82 ISO week of year (1..53)
91 The following syntax is used for these options:
92 .Bl -tag -width xxxxxxxxxx
94 exact match: run on the 3rd
96 alternation: run on 3rd, 10th, 27th
98 range: run on 1st, 2nd, 3rd, 4th, 5th
102 repetition: run on 5th, 10th, 15th, 20th, 25th, 30th day
104 shifted repetition: run on 7th, 12th, 17th, 22nd, 27th day
107 and combinations of those, e.g.\&
108 .Cm -d 1-10,15/5,28 .
111 .Cm -d* -m* -w* -D* -W* -H0 -M0 -S0 ,
112 that is, every midnight.
116 patterns need to match
119 where either day of month
121 day of week matches), so
123 only runs on Friday the 13th.
129 signal, the command is immediately executed.
131 Optionally, you can keep track of runs in time files, using
136 is passed, execution will not start earlier than the mtime
149 will start finding the first matching time
150 starting from the mtime of
156 .Cm -H0 -s 1d -t timefile
157 will start an instant
158 execution when timefile has not been touched today, whereas without
160 this would always wait until next midnight.)
164 does not exist, it will be assumed outdated enough to
165 ensure earliest execution.
168 does not update the timefiles, your job needs to do that!
169 Only mtime is looked at, so
177 is run using exec, so its exit status gets propagated to the parent.
179 If no command was given,
181 just returns with status 0.
188 .An Leah Neukirchen Aq Mt leah@vuxu.org
191 is in the public domain.
193 To the extent possible under law,
194 the creator of this work
195 has waived all copyright and related or
196 neighboring rights to this work.
198 .Lk http://creativecommons.org/publicdomain/zero/1.0/