class Rufus::Scheduler::PlainScheduler

A classical implementation, uses a sleep/step loop in a thread (like the original rufus-scheduler).

Public Instance Methods

join() click to toggle source
# File lib/rufus/sc/scheduler.rb, line 364
def join

  @thread.join
end
start() click to toggle source
# File lib/rufus/sc/scheduler.rb, line 345
def start

  @thread = Thread.new do
    loop do
      sleep(@frequency)
      self.step
    end
  end

  @thread[:name] =
    @options[:thread_name] ||
    "#{self.class} - #{Rufus::Scheduler::VERSION}"
end
stop(opts={}) click to toggle source
# File lib/rufus/sc/scheduler.rb, line 359
def stop (opts={})

  @thread.exit
end