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
schedule.in
String or Integer
schedule a task to run once in the time specified (formats above)
schedule.at
Time or String
schedule.every
String or Integer
schedule a task to run every time period on repeat
schedule.cron
String
schedule.clear
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