Class Rufus::Scheduler::PlainScheduler

  1. lib/rufus/sc/scheduler.rb

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

Methods

public instance

  1. join
  2. start
  3. stop

Public instance methods

join ()
[show source]
     # File lib/rufus/sc/scheduler.rb, line 365
365:     def join
366: 
367:       @thread.join
368:     end
start ()
[show source]
     # File lib/rufus/sc/scheduler.rb, line 346
346:     def start
347: 
348:       @thread = Thread.new do
349:         loop do
350:           sleep(@frequency)
351:           self.step
352:         end
353:       end
354: 
355:       @thread[:name] =
356:         @options[:thread_name] ||
357:         "#{self.class} - #{Rufus::Scheduler::VERSION}"
358:     end
stop (opts={})
[show source]
     # File lib/rufus/sc/scheduler.rb, line 360
360:     def stop (opts={})
361: 
362:       @thread.exit
363:     end