rufus-scheduler 2.0, with em flavour
The plain scheduler uses a thread waking up every 0.330s (by default) to check for jobs to trigger, while the em-based scheduler uses an EventMachine timer.
Other flavour for the core loop are possible, why not something 1.9 fiber based in the short term ?
This release 2.0 is mostly backward compatible. Only some corner cases and advanced usages (block arity) have changed (they have been simplified). Having a look at the readme should help.
require 'rubygems' require 'rufus/scheduler' # sudo gem install rufus-scheduler s = Rufus::Scheduler.start_new
will still work, it will return an instance of Rufus::Scheduler::PlainScheduler, but if an EM reactor is running, it will stick to it and return a Rufus::Scheduler::EmScheduler instance.