mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-25 02:41:33 +01:00
Fix error when next time in the past
This commit is contained in:
@@ -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