mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
fix(server/cron): stop all tasks with negative sleep values
Changes in 4536201 and other cron tweaks have improved the accuracy
of getNextTime. Negative values should now always be expired.
This commit is contained in:
@@ -222,11 +222,7 @@ function OxTask:scheduleTask()
|
||||
local sleep = runAt - currentTime
|
||||
|
||||
if sleep < 0 then
|
||||
if self.day or self.weekday then
|
||||
return self:stop()
|
||||
end
|
||||
|
||||
sleep += 60
|
||||
return self:stop()
|
||||
end
|
||||
|
||||
if self.debug then
|
||||
|
||||
Reference in New Issue
Block a user