schedule.Add
From GMod Wiki
Function | |
Syntax |
schedule.Add( String name, Function func, Number sec, Number min, Number hour, String wday, Number day, Number month, Number year ) Where is this used? |
Description: | |
Setup and start a schedule by name. | |
Returns: | nil |
Part of Library: | schedule |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Schedule.Add]Schedule.Add [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- name - Unique name to use for the schedule.
- func - Name of the function to run.
- sec, min, hour - Time of the day at which to run the schedule
- wday - Day of the week to run the schedule.
- day, month, year - Date on which to run the schedule.
- Any of the parameters (except name and func) can be nil.
- I have no idea what would happen if you were to specify a weekday and a date that don't match - possibly it just won't run.
- It's not possible to pass any parameters to func. You can get around this limitation by doing something along the lines of the example.