The Cron node is useful to schedule the workflows to run periodically at fixed dates, times, or intervals. This works in a similar way to the cron (opens new window) software utility in Unix-like systems. This core node is a Trigger node.
💡 Keep in mind
- If a workflow is using the Cron node as a trigger, make sure that you save and activate the workflow.
- Make sure that the timezone is set correctly for the n8n instance (or the workflow).
You can find the example usage of the Cron node in the Create Your First Workflow guide.
# Node Reference
You can configure the node by clicking on the Add Cron Time button under the Trigger Times section. There are a couple of different options available for the Mode field in the form of a dropdownlist.
- Every Minute
- Every Hour
- Every Day
- Every Week
- Every Month
- Every X
The 'Every X' option allows you to specify the workflow to be triggered every x minutes or hours. You can specify x by entering a number in the Value field. The 'Custom' option allows you to enter a custom cron expression (opens new window) in the Cron Expression field.
# How to generate a custom Cron expression?
To generate a Cron expression, you can use crontab guru (opens new window). Paste the Cron expression that you generated using crontab guru in the Cron Expression field in n8n.
# Why there are six asterisks (*) in the Cron Expression?
The sixth asterisk in the Cron Expression represents seconds. Setting this is optional. The node will execute even if you don't set the value for seconds.
If you want to trigger your workflow, for example, every day at 04:08:30, enter the following in the Cron Expression field.
30 8 4 * * *
If you want to trigger your workflow, for example, every day at 04:08, enter the following in the Cron Expression field.
8 4 * * *