mirror of
https://github.com/plashchynski/crono.git
synced 2026-11-19 06:58:18 +01:00
Fix error when next time in the past
This commit is contained in:
1 parent
e8812b1329
commit
84ac08e5d4
1 file changed
+1
-1
+1
-1
@@ -82,7 +82,7 @@ module Crono
|
||||
def start_working_loop
|
||||
loop do
|
||||
next_time, jobs = Crono.scheduler.next_jobs
|
||||
sleep(next_time - Time.now)
|
||||
sleep(next_time - Time.now) if next_time > Time.now
|
||||
jobs.each(&:perform)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user