Class: Rufus::Scheduler::SignalScheduler
- Inherits:
-
SchedulerCore
- Object
- SchedulerCore
- Rufus::Scheduler::SignalScheduler
- Defined in:
- lib/rufus/sc/scheduler.rb
Overview
A rufus-scheduler that steps only when the ruby process receives the 10 / USR1 signal.
Instance Attribute Summary
Attributes inherited from SchedulerCore
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ SignalScheduler
constructor
A new instance of SignalScheduler.
- #stop ⇒ Object
Methods inherited from SchedulerCore
#all_jobs, #at, #cron, #cron_jobs, #do_handle_exception, #every, #find, #find_by_tag, #in, #jobs, #pause, #resume, #running_jobs, start_new, #trigger_threads, #unschedule, #unschedule_by_tag
Methods included from LegacyMethods
#at_job_count, #cron_job_count, #every_job_count, #find_jobs, #pending_job_count, #precision
Constructor Details
#initialize(opts = {}) ⇒ SignalScheduler
Returns a new instance of SignalScheduler.
468 469 470 471 472 473 474 475 |
# File 'lib/rufus/sc/scheduler.rb', line 468 def initialize(opts={}) super(opts) trap(@options[:signal] || 10) do step end end |
Instance Method Details
#stop ⇒ Object
477 478 479 480 |
# File 'lib/rufus/sc/scheduler.rb', line 477 def stop trap(@options[:signal] || 10) end |