lib/rufus/scheduler/jobs.rb in rufus-scheduler-3.0.7 vs lib/rufus/scheduler/jobs.rb in rufus-scheduler-3.0.8
- old
+ new
@@ -366,21 +366,24 @@
def initialize(scheduler, time, opts, block)
super(scheduler, time, opts, block)
- @next_time = Rufus::Scheduler.parse_at(time)
+ @next_time =
+ opts[:_t] || Rufus::Scheduler.parse_at(time, opts)
end
end
class InJob < OneTimeJob
def initialize(scheduler, duration, opts, block)
super(scheduler, duration, opts, block)
- @next_time = @scheduled_at + Rufus::Scheduler.parse_in(duration)
+ @next_time =
+ @scheduled_at +
+ opts[:_t] || Rufus::Scheduler.parse_in(duration, opts)
end
end
class RepeatJob < Job
@@ -595,10 +598,10 @@
def initialize(scheduler, cronline, opts, block)
super(scheduler, cronline, opts, block)
- @cron_line = CronLine.new(cronline)
+ @cron_line = opts[:_t] || CronLine.new(cronline)
@next_time = @cron_line.next_time
end
def frequency