Cron
The Cron component can be used to schedule messages based on specific moments in time. It uses cron tabs to indicate when to send a message into the flow.
This component stays in a waiting state until a message is received. Once the component is running, jobs will start executing.
Configuration
Display Settings
Cron Jobs
The list of jobs with their respective cron tabs, and the message they output.
Syntax:cron tab | data (only string supported) | comment
Examples: */5 * * * * *| ping
- Will send the message ping
every 5 seconds.
As Object
Whether or not to send the output as an object, or as a raw string. If this is set to true a message in the format { message: "ping" }
will be sent.
Cron tab:
┬ ┬ ┬ ┬ ┬ ┬
│ │ │ │ │ │
│ │ │ │ │ └─ day of week (0 - 7) (0 or 7 is Sun)
│ │ │ │ └─── month (1 - 12)
│ │ │ └───── day of month (1 - 31, L)
│ │ └─────── hour (0 - 23)
│ └───────── minute (0 - 59)
└─────────── second (0 - 59, optional)
Some examples:
tab | description |
---|---|
0 0 1 1 * | Run annually, at First of January at 00:00 |
0 0 1 * * | Run once a month, at 00:00 on the first day of the month |
0 0 * * 0 | Run once a week, at Sunday 00:00 |
0 0 * * * | Run once a day, at 00:00 |
0 * * * * | Run once an hour, at XX:00 |
*/5 * * * * | Run once every 5 minutes |
Inputs | Outputs
Any message that is sent to the Cron component will set it to a running
state.