Class: Rufus::Scheduler::InJob

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

Instance Attribute Summary

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 OneTimeJob

#occurrences

Methods inherited from Job

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

Constructor Details

#initialize(scheduler, duration, opts, block) ⇒ InJob



379
380
381
382
383
384
385
386
# File 'lib/rufus/scheduler/jobs.rb', line 379

def initialize(scheduler, duration, opts, block)

  super(scheduler, duration, opts, block)

  @next_time =
    @scheduled_at +
    opts[:_t] || Rufus::Scheduler.parse_in(duration, opts)
end