]> gitweb.factorcode.org Git - factor.git/commit
crontab: adding "~" randomization
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 2 Dec 2023 23:29:49 +0000 (15:29 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 2 Dec 2023 23:29:49 +0000 (15:29 -0800)
commit011e378918a50aa2fefba34e1a76e362e1b02c3f
tree94b0174180fcac3bb05e096f46aa15e59fd304c9
parent0bdacf4468c245b4dff17b1cf6b0b4bea1f4866f
crontab: adding "~" randomization

from the manpage for crontab(5)

> Randomization of the execution time within a range can be
> used.  A random number within a range specified as two numbers
> separated with a tilde is picked.  The specified range is
> inclusive.  For example, 6~15 for a 'minutes' entry picks a
> random minute within 6 to 15 range.  The random number is
> picked when crontab file is parsed.  The first number must be
> less than or equal to the second one. You might omit one or
> both of the numbers specifying the range.  For example, ~ for
> a 'minutes' entry picks a random minute within 0 to 59 range.
extra/crontab/crontab.factor