Cron job

Hi everyone,

We’re currently getting a site built on the Magento platform. The developers have set up a cron job to run at 2am each morning in order to update the site, however I asked them if we could have an option to update it randomly if we need to add products urgently during the day. They said that they could give us a button to do this however they couldn’t guarantee that running the cron job during the day would not produce errors for the site viewers. They said that while people are roaming the site and interacting with the database, that this would cause conflicts if a cron job is run.

I only have limited php knowledge so just wanted to get some advice on this issue. Can anyone tell me if their response is accurate or whether in fact it’s entirely possible and safe to run a cron job during the day.

Really appreciate any input.


It really depends on what the update script does - if it updates the details for all your live products, for example, then it could potentially cause problems for your site users (say they add a product to the cart, and your update process runs and changes the price or zeros the stock amount?)

On the other hand, if it’s just adding a batch of new products then it probably wouldn’t be an issue, unless the update script is resource intensive and would cause the site to perform poorly for your end users.

Thanks for the reply,

That’s good to know because the update would be affecting the details for the live products so I can see now how it may cause problems, especially if there are products in the cart.

Maybe it’s best to keep the cron job for the early hours of the morning where there won’t be many visitors.