Rufus::Scheduler

Constants

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
50:   def self.is_cron_string(s)
51: 
52:     s.match(/.+ .+ .+ .+ .+/) # well...
53:   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
39:   def self.start_new(opts={})
40: 
41:     if defined?(EM) and EM.reactor_running?
42:       EmScheduler.start_new(opts)
43:     else
44:       PlainScheduler.start_new(opts)
45:     end
46:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.