AutomationFlowsTutorials › Scheduled jobs and cron in n8n

Scheduled jobs and cron in n8n

This tutorial covers scheduling jobs and using cron expressions in n8n to automate repetitive tasks at precise intervals, including handling time zones and avoiding common scheduling errors. It's for technical users already comfortable with n8n basics who need detailed steps to implement reliable scheduled workflows.

Why this matters

Scheduling in n8n ensures automations run predictably without manual intervention, but misconfigured cron expressions or ignored time zones can lead to missed runs, duplicate executions, or jobs firing at odd hours, disrupting business operations. Mastering these tools prevents clock drift and enables setups like business-hours-only triggers or monthly cycles, saving time on debugging and maintenance.

Step-by-step

  1. Open your n8n instance and create a new workflow by clicking the + New button in the workflows list.
  2. Search for and add the Schedule Trigger node to the canvas by typing "schedule" in the node palette; this is n8n's primary node for cron-based scheduling, replacing the older Cron node in recent versions.
  3. Double-click the Schedule Trigger node to open its settings. In the Trigger Interval dropdown, select Cron Expression to enable custom scheduling.
  4. Enter your cron expression in the Cron Expression field, using standard format like 0 9 * * 1-5 for every weekday at 9:00 AM; refer to the built-in help text or external cron generators for syntax validation.
  5. Set the Timezone parameter to your desired zone, such as Europe/London, to ensure executions align with local business hours—n8n uses the IANA timezone database, so list available options via the dropdown.
  6. Optionally, configure Mode to Run Once on Start or Every Interval based on needs; connect a simple Function node downstream to test, e.g., outputting {{ new Date().toISOString() }} to log execution time.
  7. Activate the workflow by toggling the Active switch in the top-right; monitor the executions tab to confirm the first run triggers as expected.
  8. For business-hours-only setups, chain multiple Schedule Trigger nodes or use an IF node after the trigger to filter runs outside hours, e.g., checking {{ $now.hour() >= 9 && $now.hour() < 17 }} in a Code node.
  9. Save and test monthly cycles by setting a cron like 0 0 1 * * for the first of every month at midnight, then simulate with n8n's manual execution button while adjusting your system clock if needed for quick verification.

Worked example

Consider a common pattern: a daily backup workflow that runs only during business hours on weekdays and emails a summary report. Start with a Schedule Trigger node configured with cron expression 0 10 * * 1-5 and timezone America/New_York, triggering at 10:00 AM Eastern Time Monday to Friday. Connect it to an HTTP Request node to fetch data from an API endpoint, say backing up user metrics from a CRM like https://api.example.com/metrics with method GET and authentication via API key. Next, add a Google Sheets node to append the fetched JSON data to a spreadsheet, mapping fields like {{ $json.users }} to columns. Finally, link to an Email node (using Gmail credentials) that sends a confirmation with subject "Daily Backup Complete" and body including execution timestamp from {{ $execution.startTime }}. End-to-end, this workflow activates at 10:00 AM ET on workdays, pulls data, logs it to Sheets, and notifies via email, ensuring compliance with business hours without weekend runs.

Common pitfalls

Related workflows in the catalog

Explore the n8n workflow catalog for ready-to-import examples like "Daily Report Generator," which uses a Schedule Trigger for business-hour emails, or "Monthly Billing Cycle," demonstrating cron for first-of-month tasks. With over 14,000+ importable workflows available, search for "cron" or "schedule" to find variations tailored to time zones and error handling. These can be customised directly in your instance to fit specific automation needs.