Files
_Not_ 4dd4c9c8ca Merge pull request #1839 from seltonmt012/fix/cron-callback-guard
fix(cron): keep the scheduler alive when a job errors
2026-08-14 19:41:00 -05:00
..
2025-01-08 14:17:39 +01:00
2026-05-25 12:12:51 +02:00

[ESX] Cron

Discord - Website - Documentation

A simple, but vital, resource that allows resources to Run tasks at specific intervals.

Example Usage


-- 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)

Legal

cron - run tasks at specific intervals!

Copyright (C) 2015-2024 Jérémie N'gadi

This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.

This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.

You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/.