DevToolHere

How to Build Cron Expressions

Cron expressions schedule recurring tasks on Unix systems, CI/CD pipelines, and cloud functions. The five-field syntax (minute, hour, day, month, weekday) is compact but easy to get wrong. This guide helps you build correct cron expressions visually.

Try Crontab Generator Now

Free, no signup. Works in your browser.

Open Tool
1

Open the Crontab Generator

Navigate to the Crontab Generator in the Debug category. You will see a visual editor with dropdowns for each of the five cron fields plus a preview of upcoming run times.

2

Set the schedule fields

Use the dropdowns or type directly to set minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6). Use * for 'every', */5 for 'every 5th', and commas for specific values.

3

Preview next run times

The tool calculates and displays the next 5-10 execution times based on your cron expression. Verify that the schedule matches your intention before deploying.

4

Use preset templates

Click on common presets like 'every hour', 'daily at midnight', 'weekdays at 9am', or 'first day of month'. These fill in the fields instantly and serve as a starting point for customization.

5

Copy the cron expression

Copy the final expression (e.g., `0 9 * * 1-5`) along with a human-readable description. Paste it into your crontab file, GitHub Actions workflow, or cloud scheduler configuration.

Pro Tips

  • *Remember: cron fields are minute, hour, day-of-month, month, day-of-week — in that order.
  • *Use `0 */2 * * *` for every 2 hours, not `*/2 * * * *` (which runs every 2 minutes).
  • *For GitHub Actions, use `cron: '30 4 * * *'` with quotes in the YAML schedule trigger.
  • *Always set cron jobs to UTC to avoid daylight saving time surprises.
  • *Add a comment above each crontab entry explaining what it does — your future self will thank you.

Related Guides

Explore all 110+ tools