module Rufus::Scheduler
Constants
- VERSION
This gem's version
Public Class Methods
is_cron_string(s)
click to toggle source
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(/.+ .+ .+ .+ .+/) # well... end
start_new(opts={})
click to toggle source
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