Scheduling Actions
Every driver can schedule events to occur in a number of different ways. Schedules are automatically cleared when a driver is terminated.
Integer arguments are in milliseconds.
1000
== 1 secondStrings can be used for a friendly representation of the time
'30s'
== 30 seconds'5m'
== 5 minutes'1w2d3h5m'
== 1 week, 2 days, 3 hours and 5 minutes'2Y1M'
== 2 years, 1 month
Function | Arguments | Description |
| String or Integer | schedule a task to run once in the time specified (formats above) |
| Time or String | schedule a task at a time represented by a Time object or a parsable time string |
| String or Integer | schedule a task to run every time period on repeat |
| String | A schedule that will fire based on a CRON string |
| shortcut for cancelling any active schedules |
Examples
There are often situations where you want to run the block immediately.
CRON also supports time zones - which should always be configured
See the list of supported time zone strings and information about time zones.
Last updated