New to Rails 3? Check out the Ruby on Rails 3 Tutorial book and screencast.

A book and screencast series showing you how to develop and deploy industrial-strength Rails apps in a direct, step by step way. The screencast series includes 12 lessons over more than 15 hours! Get the best "over the shoulder" experience of following what a top Rails 3 developer does when building an app today. Click here to learn more.

Rufus Scheduler: Simple Task Scheduling from Rails Apps

In Miscellaneous, Tools

clock.gifBrent Collier of Intridea has written Dead simple task scheduling in Rails that highlights the use of Rufus-Scheduler, by John Mettraux, to perform, well.. dead simple tasks scheduling from a Rails app!

Rufus-Scheduler is the latest version of a scheduler previously known as openwferu-scheduler (try saying that quickly three times). It's not a Rails-only deal but Brent shows how to install it for use from within a Rails app. It parses time strings, so you can tell it to schedule something to occur "every 10m10s" (10 minutes 10 seconds) or to occur at "Sun Oct 07 14:24:01 +0900 2009" or you can supply it with a cron-style string.

The scheduler doesn't do any server-side voodoo to get jobs to run, but relies on its scheduler being run up and maintained persistently (or semi-persistently, as with Rails app processes that will tip the scheduler into action).

As an aside, Intridea are running an Introduction to Ruby on Rails course between February 27 and March 1, 2009 (yes, in 11 days!) in Washington DC. So if you want to go and learn Rails from two ultra qualified Rails guys (Adam Bair and Joe Grossberg) go check it out.

Post to Twitter Tweet This Post

Vaguely Related Posts (Usually)

Leave a Reply