15 Oct '13, 6pm
Scheduling tasks on Cloud Foundry by @bobbins
In migrating our internal apps from Heroku over to Cloud Foundry, we’ve had to work around the fact that Cloud Foundry doesn’t (yet!) have a feature equivalent to Heroku’s scheduler. Fortunately, it’s pretty easy to set up a scheduler – one that’s even got a finer level of scheduling granularity. Below, I go through the details of creating a scheduler for Rake tasks. It’s abstract enough that it should work for other types of jobs… basically, anything that you’d type directly into the command line. At a high level, our goal here is to create 2 additional apps. One of these is responsible for scheduling tasks, and the other is responsible for queueing and executing these tasks. I chose to use Clockwork for scheduling the jobs, and Resque for queueing and processing the jobs. There are other options for each of these – popular alternatives to Clockwork include Whenever, Rufu...