6 .Nd run a command at a particular time
25 waits until a particular time and then runs a command.
26 Together with a service supervision system such as
28 this can be used to replace
31 The options are as follows:
34 Dry run: print the next 5 times the command would run and exit.
36 Verbose: print scheduled (and rescheduled) times.
43 seconds later than the scheduled time.
45 Commands are executed even if they are
47 (default: 60) seconds late.
56 are parsed as seconds,
65 The remaining arguments are patterns for the time fields:
67 .Bl -tag -compact -width xxxxxxxxxx
73 weekday (0-7, sunday is 0 and 7)
77 ISO week of year (1..53)
86 The following syntax is used for these options:
87 .Bl -tag -width xxxxxxxxxx
89 exact match: run on the 3rd
91 alternation: run on 3rd, 10th, 27th
93 range: run on 1st, 2nd, 3rd, 4th, 5th
97 repetition: run on 5th, 10th, 15th, 20th, 25th, 30th day
99 shifted repetition: run on 7th, 12th, 17th, 22nd, 27th day
102 and combinations of those, e.g.\&
103 .Cm -d 1-10,15/5,28 .
106 .Cm -d* -m* -w* -D* -W* -H0 -M0 -S0 ,
107 that is, every midnight.
111 patterns need to match
114 where either day of month
116 day of week matches), so
118 only runs on Friday the 13th.
124 signal, the command is immediately executed.
126 Optionally, you can keep track of runs in time files, using
131 is passed, execution will not start earlier than the mtime
144 will start finding the first matching time
145 starting from the mtime of
151 .Cm -H0 -s 1d -t timefile
152 will start an instant
153 execution when timefile has not been touched today, whereas without
155 this would always wait until next midnight.)
159 does not exist, it will be assumed outdated enough to
160 ensure earliest execution.
163 does not update the timefiles, your job needs to do that!
164 Only mtime is looked at, so
172 is run using exec, so its exit status gets propagated to the parent.
174 If no command was given,
176 just returns with status 0.
183 .An Leah Neukirchen Aq Mt leah@vuxu.org
186 is in the public domain.
188 To the extent possible under law,
189 the creator of this work
190 has waived all copyright and related or
191 neighboring rights to this work.
193 .Lk http://creativecommons.org/publicdomain/zero/1.0/