Module plugin_scheduler
SparkMod plugin scheduler.
Scheduled tasks are automatically unscheduled when a plugin is unloaded
Functions
| scheduler.In (seconds, callback, ...) | Schedules a task to be run in amount of seconds |
| scheduler.Every (seconds, callback, ...) | Schedules a task to be run every amount of seconds |
| scheduler.Unschedule (...) | Unschedules any number of tasks by ids, tags or task tables |
| scheduler.UnscheduleAll () | Unschedules all tasks that the plugin has scheduled |
Functions
- scheduler.In (seconds, callback, ...)
-
Schedules a task to be run in amount of seconds
Parameters:
- seconds number the amount of time until the callback is called
- callback func the function to be called at the scheduled time
- ... any number of tag strings which will be associated with this task
Returns:
-
table
a table containing info about the scheduled task
- scheduler.Every (seconds, callback, ...)
-
Schedules a task to be run every amount of seconds
Parameters:
- seconds number the amount of time between each time the callback is called
- callback func the function to be called at the scheduled time
- ... any number of tag strings which will be associated with this task
Returns:
-
table
a table containing info about the scheduled task
- scheduler.Unschedule (...)
-
Unschedules any number of tasks by ids, tags or task tables
Parameters:
- ... any number of tag strings, ids or task tables
- scheduler.UnscheduleAll ()
- Unschedules all tasks that the plugin has scheduled