Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm installing a bunch of Magento shops on a webserver. Every website has a cron job that Magento uses to update its stuff -- it takes 3-4 seconds to complete. The instructions tell to set it to run every 5 minutes.

I was asking to myself if is it advisable, for performance reasons, to set every cron to run at different minutes (e.g.: minute 0, 5, 10, etc for the first website -- minute 1, 6, 11, etc for the second and so on), to reduce overlapping, or if this is useless because linux executes multiple cron jobs at the same minute in order, avoiding concurrency.

share|improve this question
Short answer is yes : It is advisable : If you have one cron entry per magento instance, cron jobs will run concurrently – user130370 Feb 6 '13 at 12:03
up vote 3 down vote accepted

Depends on.

If it isn't a problem to run these cron jobs simultaneously, so they don't interfere on each other by overwriting each-others files, etc... and if your machine can handle the peak load you can run them simultaneously.

If you wan't to smear the load on your server and your scripts handle well (don't depend on when it is run) then you can run them in different minutes. Also you can also add some randomness to it if you want with sleep $(( $RANDOM%100 )); somecommand to wait 1 to 100 random seconds before executing the script.

share|improve this answer
Thank you very much! Thanks also to Sonassi, I have chose the answer from Stone because he introduced this good idea of randomness ;) – flip79 Feb 7 '13 at 12:00

The best thing to do here is test it.

Linux is capable of running multiple jobs at the same time. Depending on how resource intensive each job is there may be some contention if you start many jobs at the same time. Splitting them up doesn't cause any problems and would certainly reduce potential problems caused by multiple jobs starting at the same time.

share|improve this answer

Our shared hosting servers run up to 12 stores on a single machine - all of which are running their own cron tasks.

There is no problem at all doing this.

In terms of run schedules, we've found some modules are intolerant of the cron being executed at anything other than exactly 5 minute intervals, starting at 5 minutes past the hour.

*/5 * * * * /home/path/public_html/
share|improve this answer
"We've found some modules are intolerant..." - which ones? – nickgrim Feb 6 '13 at 17:34
*/5 means exactly the same thing as 0,5,10,15,20,25,30,35,40,45,50,55. – mgorven Feb 6 '13 at 18:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.