October 1 2011
Rails Tip: Locking Cron Jobs
I really like using the Ruby whenever gem for managing cron jobs in Rails. But recently I needed to ensure there was only one instance of a cron job running. If it took a bit too long, I didn’t want another instance starting up in parallel. Enter flock.