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

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable