Skip to content

Commit

Permalink
fix(server/cron): stop all tasks with negative sleep values
Browse files Browse the repository at this point in the history
Changes in 4536201 and other cron tweaks have improved the accuracy
of getNextTime. Negative values should now always be expired.
  • Loading branch information
thelindat committed Aug 2, 2023
1 parent b014e43 commit 1a74263
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions imports/cron/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a74263

Please sign in to comment.