Cron Fivem Code Example
Example: fivem cron
-- Execute task 5:10, every day
function CronTask(d, h, m)
print('Task done')
end
TriggerEvent('cron:runAt', 5, 10, CronTask)
-- Execute task every monday at 18:30
function CronTask(d, h, m)
if d == 1 then
print('Task done')
end
end
TriggerEvent('cron:runAt', 18, 30, CronTask)
Comments
Post a Comment