4 ms·
> 5 is an odd requirement potentially better implemented outside cron, such as with a single line of shell code involving the "at" command (and "expr" to scale
by Dylan16807 3y ago
> 5 is an odd requirement potentially better implemented outside cron, such as with a single line of shell code involving the "at" command (and "expr" to scale a /dev/random value).
I'm very surprised you think that. I would say that the job scheduler is the perfect place to randomize start times.
- tannhaeuser 3y agoWhy? Starting a process at random seems like a one off thing.
- Dylan16807 3y agoIf it's a one-off then you rarely need randomization. For scheduled tasks, you often want randomization so that your fleet of servers is not all doing the task at the exact same time. Think "start between 2am and 4am every day". You can work around it by picking an offset at install time like scheduling for 3:17am in particular on this server, or by putting a random sleep into the job, but both of those obfuscate the actual scheduling intent.