diff --git a/imports/cron/server.lua b/imports/cron/server.lua index 632460f..cb6b6f6 100644 --- a/imports/cron/server.lua +++ b/imports/cron/server.lua @@ -238,12 +238,14 @@ function OxTask:scheduleTask() end if self.isActive then - self:job(currentDate) - if self.debug then - print(('(%s/%s/%s %s:%s) ran task %s'):format(currentDate.year, currentDate.month, currentDate.day, currentDate.hour, currentDate.min, self.id)) + print(('(%s/%s/%s %s:%s) running task %s'):format(currentDate.year, currentDate.month, currentDate.day, currentDate.hour, currentDate.min, self.id)) end + Citizen.CreateThreadNow(function() + self:job(currentDate) + end) + Wait(30000) return true