Cron Expression Generator — Build and Explain Cron Schedules
Cron is the universal scheduling system for Unix and Linux. Every server, CI/CD pipeline, cloud function, and container orchestrator uses cron expressions to define when jobs run. Whether you're scheduling database backups, log rotation, report generation, or cache invalidation, getting the cron expression right is critical — a mistake can mean jobs running every second instead of every hour.
Understanding the Five Fields
A cron expression consists of five fields: minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–6, where 0 is Sunday). Each field accepts exact values, ranges (1-5), lists (1,3,5), steps (*/5), and the wildcard (*). These combine to express schedules from "every minute" to "at 2:30 AM on the first Monday of January."
Common Cron Patterns
The most frequently used expressions include * * * * * (every minute), 0 * * * * (every hour on the hour), 0 0 * * * (daily at midnight), 0 0 * * 0 (weekly on Sunday), and 0 0 1 * * (monthly on the 1st). Step expressions like */5 * * * * (every 5 minutes) and */15 * * * * (every 15 minutes) are common for monitoring and health checks.
Where Cron Expressions Are Used
Beyond Unix crontab, cron expressions appear in AWS CloudWatch Events, Google Cloud Scheduler, Azure Functions, GitHub Actions, Kubernetes CronJobs, Jenkins, Airflow, Celery Beat, and systemd timers. The 5-field syntax is nearly universal, though some platforms add a seconds field or support non-standard extensions. This generator uses the standard 5-field format compatible with all major systems.
Debugging Cron Schedules
The most common cron mistake is confusing field order — putting the hour in the minute field or vice versa. This generator's human-readable output eliminates ambiguity: if it says "At minute 0 past hour 9" when you wanted every 9 minutes, you know the fields are swapped. The next-run-times preview adds a second layer of verification by showing concrete future execution dates.
Cron Expression Best Practices
Avoid running jobs at midnight (0 0 * * *) when possible — it's the most congested time on most systems. Stagger jobs by a few minutes (e.g., 0 3 * * *) to spread load. For jobs that must not overlap, add a lock file or use a job queue. Always test expressions with a tool like this before deploying to production, especially for complex schedules involving day-of-month and day-of-week combinations.
Privacy
This tool runs entirely in your browser. No cron expressions or schedule data are sent to any server. The next-run-time calculations happen client-side using JavaScript's Date API.