Class: Rufus::Scheduler::CronJob

Inherits:
RepeatJob show all
Defined in:
lib/rufus/scheduler/jobs.rb

Instance Attribute Summary

Attributes inherited from RepeatJob

#first_at, #last_at, #paused_at, #times

Attributes inherited from Job

#callable, #count, #handler, #id, #last_time, #last_work_time, #mean_work_time, #next_time, #opts, #original, #scheduled_at, #tags, #unscheduled_at

Instance Method Summary collapse

Methods inherited from RepeatJob

#determine_id, #occurrences, #pause, #paused?, #resume, #trigger

Methods inherited from Job

#[], #[]=, #call, #key?, #keys, #kill, #running?, #scheduled?, #threads, #trigger, #unschedule

Constructor Details

#initialize(scheduler, cronline, opts, block) ⇒ CronJob

Returns a new instance of CronJob



600
601
602
603
604
605
606
# File 'lib/rufus/scheduler/jobs.rb', line 600

def initialize(scheduler, cronline, opts, block)

  super(scheduler, cronline, opts, block)

  @cron_line = opts[:_t] || CronLine.new(cronline)
  @next_time = @cron_line.next_time
end

Instance Method Details

#brute_frequencyObject



613
614
615
616
# File 'lib/rufus/scheduler/jobs.rb', line 613

def brute_frequency

  @cron_line.brute_frequency
end

#frequencyObject



608
609
610
611
# File 'lib/rufus/scheduler/jobs.rb', line 608

def frequency

  @cron_line.frequency
end