BotMine›Developer Docs›Scheduler
Lua Addon SDK
Scheduler
Schedule one-time and recurring tasks.
One-time task
luascheduler.setTimeout(function() logger.info("Task executed") end, 5000)
The delay is given in milliseconds.
Recurring task
lualocal taskId = scheduler.setInterval(function() logger.debug("Heartbeat") end, 60000)
Cancel a task
luascheduler.cancel(taskId)
Methods
setTimeout(callback, delayMillis)setInterval(callback, intervalMillis)cancel(taskId)