mirror of
https://github.com/plashchynski/crono.git
synced 2026-11-16 13:41:06 +01:00
Handle situation when Job#next is in the past
This commit is contained in:
1 parent
2b53dc7ea1
commit
0351079961
1 file changed
+2
-1
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user