From 1a742639493f472024e211a465414b7ba106e21d Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Thu, 3 Aug 2023 00:53:39 +1000 Subject: [PATCH] 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. --- imports/cron/server.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/imports/cron/server.lua b/imports/cron/server.lua index b2fc14f..e409f83 100644 --- a/imports/cron/server.lua +++ b/imports/cron/server.lua @@ -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