Module: Rufus::Scheduler::LegacyMethods

Included in:
SchedulerCore
Defined in:
lib/rufus/sc/scheduler.rb

Overview

Legacy from the previous version of Rufus-Scheduler.

Consider all methods here as ‘deprecated’.

Instance Method Summary collapse

Instance Method Details

#at_job_countObject



67
68
69
70
# File 'lib/rufus/sc/scheduler.rb', line 67

def at_job_count
  @jobs.select(:at).size +
  @jobs.select(:in).size
end

#cron_job_countObject



74
75
76
# File 'lib/rufus/sc/scheduler.rb', line 74

def cron_job_count
  @cron_jobs.size
end

#every_job_countObject



71
72
73
# File 'lib/rufus/sc/scheduler.rb', line 71

def every_job_count
  @jobs.select(:every).size
end

#find_jobs(tag = nil) ⇒ Object



64
65
66
# File 'lib/rufus/sc/scheduler.rb', line 64

def find_jobs (tag=nil)
  tag ? find_by_tag(tag) : all_jobs.values
end

#pending_job_countObject



77
78
79
# File 'lib/rufus/sc/scheduler.rb', line 77

def pending_job_count
  @jobs.size
end

#precisionObject



80
81
82
# File 'lib/rufus/sc/scheduler.rb', line 80

def precision
  @frequency
end