mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
refactor/cron/server/main): Validate event params
This commit is contained in:
@@ -47,5 +47,9 @@ LastTime = GetUnixTimestamp()
|
||||
Tick()
|
||||
|
||||
AddEventHandler("cron:runAt", function(h, m, cb)
|
||||
assert(type(h) == "number", ("Expected number for h, got %s"):format(type(h)))
|
||||
assert(type(m) == "number", ("Expected number for m, got %s"):format(type(m)))
|
||||
assert(type(cb) == "function", ("Expected function for cb, got %s"):format(type(cb)))
|
||||
|
||||
RunAt(h, m, cb)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user