mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-19 02:28:33 +00:00
fix(server/cron): prevent scheduling tasks for new days
From 8488de.
This commit is contained in:
1 parent
149213032b
commit
9c90b5be5f
1 file changed
+7
@@ -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