Handle situation when Job#next is in the past

This commit is contained in:
Dzmitry Plashchynski
2015-03-07 01:38:50 +02:00
parent 2b53dc7ea1
commit 0351079961

View File

@@ -11,7 +11,8 @@ module Crono
end
def next
period.next(since: last_performed_at)
next_time = period.next(since: last_performed_at)
next_time.past? ? period.next : next_time
end
def description