Van: Don Lewis <[email protected]>
Datum: maandag, 2 november 2026 19:27
Aan: Jamie Landeg-Jones <[email protected]>
CC: [email protected], [email protected], [email protected]
Onderwerp: Re: Should we add jitter to cron(8) ?

On  2 Nov, Jamie Landeg-Jones wrote:
> Peter Jeremy <[email protected]> wrote:
>
>> IMO, it would be useful to have a way of saying e.g. "run once an hour
>> but I don't care when within the hour".
>
> I assume that the time within the hour would be the same each hour? If so,
> that would be useful.
>
> But would than initial state random number be stored somewhere, or reset
> each time cron starts?

... and if cron gets restarted, could the job get run twice in that
hour?





Some inspirational thoughts.

OpenBSD already has a notation for random (~) in their crontab definition.
https://man.openbsd.org/crontab.5

And Jenkins (the CI/CD tool) can use a hash to get some "stable random" number 
for scheduling jobs.
"The H symbol can be thought of as a random value over a range, but it actually is a 
hash of the job name, not a random function, so that the value remains stable for any 
given project."
Examples like: H H(0-7) * * * or H/3, @hourly becomes H * * * *.

Regards,
Ronald.

Reply via email to