How to use locks in PHP cron jobs to avoid cron overlaps

April 17th, 2010 by admin Leave a reply »

Cron jobs are hidden building blocks for most of the websites. They are generally used to process/aggregate data in the background. However as a website starts to grow and there is gigabytes of data to be processed by every cron job, chances are that our cron jobs might overlap and possibly corrupt our data. In this blog post, I will demonstrate how can we avoid such overlaps by using simple locking techniques. I will also discuss a few edge cases we need to consider while using locks to avoid overlap.

Read the rest of the post

Random Posts
    Advertisement

    Leave a Reply

    Spam Protection by WP-SpamFree