The Phenomenon of the Cron
Posted: December 7, 2005 Filed under: WebBasedCron 3 Comments »Sorry for the dramatic title, its not really. But I have noticed an interesting pattern back in the summer. I tracked the number of cron job run every minute for an entire week. I made a quick graph which shows how many cron jobs run each minute (on average).
The results are pretty intersting. Most people who run a cron job once an hour, generally select the 0th minute (on the hour) to have the cron job run. As it turns out, a lot of people do this, and on the hour a large load on the server occurs. The same thing occrus on the 30th minute, etc.
If it doesn’t matter which minute of the hour your cron job runs on, login and choose a random minute like 37 (instead of 0). The original post can be found here.
All the best,
George
WebBasedCron
Hi George,
> If it doesn’t matter which minute of the hour your cron job
> runs on, login and choose a random minute like 37
It depends what the job is doing. That’s true for background maintenance tasks, but our site sends out SMS text messages on the hour – users are expecting to receive them promptly at the time they specify.
Have a Merry Christmas and Happy New Year!
David De Silva
Hi David,
Oh definitely, I was referring to cron jobs were the time didn’t matter.
Merry Christmas,
all the best in 2006
George
The same advice (pick a random minute) goes for scheduling anything, like checking your email and sending out listserve digests.
One email client I use simply won’t let you schedule email checks on the hour. You can pick :06, :16, :26… for scheduled checks. Another copy of the same exact client lets you choose :02, :12, :22…, which means it must pick a number when it’s installed. Nice touch.