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:
Linden
2023-08-03 00:53:39 +10:00
parent b014e43e14
commit 1a74263949

View File

@@ -222,11 +222,7 @@ function OxTask:scheduleTask()
local sleep = runAt - currentTime local sleep = runAt - currentTime
if sleep < 0 then if sleep < 0 then
if self.day or self.weekday then return self:stop()
return self:stop()
end
sleep += 60
end end
if self.debug then if self.debug then