module Rufus::Scheduler

def self.is_cron_string (s)


Returns true if the given string seems to be a cron string.
def self.is_cron_string (s)
  s.match(/.+ .+ .+ .+ .+/) # well...
end

def self.start_new (opts={})


it will create a PlainScheduler instance.
If EventMachine is present and running will create an EmScheduler, else

s = Rufus::Scheduler.start_new
require 'rubygems'

A quick way to get a scheduler up an running
def self.start_new (opts={})
  if defined?(EM) and EM.reactor_running?
    EmScheduler.start_new(opts)
  else
    PlainScheduler.start_new(opts)
  end
end