SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: cron job

  1. #1
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  2. #2
    Community Advisor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,388
    Mentioned
    45 Post(s)
    Tagged
    12 Thread(s)
    Hi,

    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.

  3. #3
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •