This gem's version
Returns true if the given string seems to be a cron string.
# File lib/rufus/scheduler.rb, line 50 def self.is_cron_string (s) s.match(%r.+ .+ .+ .+ .+/) # well... end
A quick way to get a scheduler up an running
require 'rubygems' s = Rufus::Scheduler.start_new
If EventMachine is present and running will create an EmScheduler, else it will create a PlainScheduler instance.
# File lib/rufus/scheduler.rb, line 39 def self.start_new (opts={}) if defined?(EM) and EM.reactor_running? EmScheduler.start_new(opts) else PlainScheduler.start_new(opts) end end