diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2023-05-06 23:06:28 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2023-05-06 23:06:28 +0000 |
commit | 2f7d50474fd442e33252976ff86f503ec04ba949 (patch) | |
tree | 1464de1186a8a951c1eb5c6e5280a47cb5adb10e /etc/ksh.kshrc | |
parent | c552dfcdf612f32a19af4652788bfb10e6f0edba (diff) |
Support random offsets when using ranges with a step value in cron.
This extends the random range syntax to support step values. Instead
of choosing a random number between the high and low values, the
field is treated as a range with a random offset less than the step
value. This can be used to avoid thundering herd problems where
multiple machines contact a server all at the same time via cron jobs.
The syntax is similar to the existing range/step syntax but uses a
random range. For example, instead of "0-59/10" in the minutes
field, "0~59/10" can be used to run a command every 10 minutes where
the first command starts at a random offset in the range [0,9].
The high and low numbers are optional, "~/10" can be used instead.
Requested by job@, OK phessler@
Diffstat (limited to 'etc/ksh.kshrc')
0 files changed, 0 insertions, 0 deletions