Yes it’s a real effect. I’ve just hardcoded offsets on various jobs:
* * * * * sleep 17 && …
etc.That way I still maintain a per-job 60-second cadence consistently (which random would not), but don’t do it right on the top of the minute.
That's interesting as it is also visible with a crontab -l so that new scripts can avoid using the same second. However, if you have a farm of machines with the same hardcoded value, they will all still stampede at the same time just not at the top of the minute. By allowing a random value, their start times are slightly offset with in the minute. Is the precise 60s consistent interval really that critical or just that each machine checks once per minute-ish?
Systemd timers do this natively btw, no need to hardcode And imho are also friendlier.
Yes, using prime numbers are a good way to reduce the risk of multiple timers coinciding, for example a 10s, 30s, 60s period on a freshly restarted node / process.