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 (0..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.
120 Optionally, you can keep track of runs in time files, using
127 is passed, execution will not start earlier than the mtime
140 will start finding the first matching time
141 starting from the mtime of
147 .Cm -H0 -s 1d -t timefile
148 will start an instant
149 execution when timefile has not been touched today, whereas without
151 this would always wait until next midnight.)
155 does not exist, it will be assumed outdated enough to
156 ensure earliest execution.
159 does not update the timefiles, your job needs to do that!
160 Only mtime is looked at, so
168 is run using exec, so its exit status gets propagated to the parent.
170 If no command was given,
172 just returns with status 0.
179 .An Christian Neukirchen Aq Mt chneukirchen@gmail.com
182 is in the public domain.
184 To the extent possible under law,
185 the creator of this work
186 has waived all copyright and related or
187 neighboring rights to this work.
189 .Lk http://creativecommons.org/publicdomain/zero/1.0/