rufus-scheduler 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rufus/sc/jobs.rb +14 -0
- data/lib/rufus/sc/scheduler.rb +1 -1
- metadata +1 -1
data/lib/rufus/sc/jobs.rb
CHANGED
@@ -201,6 +201,13 @@ module Scheduler
|
|
201
201
|
|
202
202
|
@at = Rufus.at_to_f(@t)
|
203
203
|
end
|
204
|
+
|
205
|
+
# Returns the next time (or the unique time) this job is meant to trigger
|
206
|
+
#
|
207
|
+
def next_time
|
208
|
+
|
209
|
+
Time.at(@at)
|
210
|
+
end
|
204
211
|
end
|
205
212
|
|
206
213
|
#
|
@@ -327,6 +334,13 @@ module Scheduler
|
|
327
334
|
trigger(time) if @cron_line.matches?(time)
|
328
335
|
end
|
329
336
|
|
337
|
+
# Returns the next time this job is meant to trigger
|
338
|
+
#
|
339
|
+
def next_time (from=Time.now)
|
340
|
+
|
341
|
+
@cron_line.next_time(from)
|
342
|
+
end
|
343
|
+
|
330
344
|
protected
|
331
345
|
|
332
346
|
def determine_at
|
data/lib/rufus/sc/scheduler.rb
CHANGED