mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
fix(server/cron): prevent scheduling tasks for new days
From 8488de.
This commit is contained in:
@@ -141,6 +141,13 @@ function OxTask:getNextTime()
|
||||
|
||||
if not hour then return end
|
||||
|
||||
if minute >= 60 then
|
||||
minute = 0
|
||||
hour += 1
|
||||
end
|
||||
|
||||
if hour >= 24 and day then return end
|
||||
|
||||
return os.time({
|
||||
min = minute,
|
||||
hour = hour,
|
||||
|
||||
Reference in New Issue
Block a user