mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-22 10:58:36 +00: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:
1 parent
b014e43e14
commit
1a74263949
1 file changed
+1
-5
@@ -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