Generate, explain, and validate cron expressions, with the next run times in any timezone.
In Plain English
What your cron expression actually means.
Upcoming Executions
Preview the next 50 times this schedule will trigger.
Cron Syntax Reference
A cron expression has five space-separated fields: minute hour day month weekday. Each field controls when the job runs.
For example, runs at midnight daily, runs at midnight every Monday, and runs at midnight on weekdays.
| Field | Allowed Values | Example |
|---|---|---|
| Minute | 0-59 | 5 |
| Hour | 0-23 | 14 |
| Day of Month | 1-31 | 1 |
| Month | 1-12 or JAN-DEC | JAN |
| Day of Week | 0-6 or SUN-SAT | MON |
Special Characters
*— matches any value,— list multiple values (e.g.,1,3,5)-— define a range (e.g.,1-5)/— specify intervals (e.g.,*/15for every 15)
Shorthand Aliases
Most crontab implementations accept these shortcuts, and so does this calculator:
- — same as
0 * * * * - — same as
0 0 * * *(also@midnight) - — same as
0 0 * * 0 - — same as
0 0 1 * * - — same as
0 0 1 1 *(also@annually)
Common Examples
- Every day at midnight
- Every 15 minutes during work hours, Mon-Fri
- Every Sunday at noon
- On the first day of every month at midnight
- Every Friday at 6 PM
What is Cron?
Cron is a time-based job scheduler found in Unix-like operating systems. A cron expression defines when a task should run using a compact five-field format.
You'll find cron expressions in Linux servers, AWS CloudWatch, GitHub Actions, Kubernetes CronJobs, and most CI/CD platforms. They're powerful but notoriously hard to read—that's why we built this tool.
Common Cron Job Use Cases
- Database backups — Schedule nightly or weekly backups of your database
- Log rotation — Clean up old log files to free disk space
- Email reports — Send daily or weekly summary emails
- Cache clearing — Periodically clear application caches
- Data sync — Synchronize data between services at regular intervals
- Health checks — Monitor system health every few minutes
- CI/CD pipelines — Trigger scheduled builds and deployments
Cron Tips & Best Practices
- Avoid midnight congestion — Many jobs run at . Stagger your jobs to reduce server load.
- Use specific times — (3 AM) is often better than midnight for maintenance tasks.
- Consider timezones— Cron runs in the scheduler's timezone, which is usually UTC on servers. Use the timezone picker above to preview run times before you deploy.
- Watch uneven steps — looks like every 7 minutes, but the gap from minute 56 back to 0 is only 4 minutes.
- Test with shorter intervals — When debugging, use (every 5 min) before switching to the final schedule.
- Log your jobs — Always redirect output to a log file for debugging.
- Use absolute paths— Cron doesn't load your shell profile, so always use full paths to commands and scripts.
Frequently Asked Questions
What's the difference between 5-field and 6-field cron?
Standard cron uses 5 fields (minute, hour, day of month, month, day of week). Quartz and Spring add a 6th field for seconds at the beginning. This tool accepts both and warns you when a 6-field expression won't be portable to standard crontab, GitHub Actions, or Kubernetes.
Is Sunday 0 or 7?
Both work in most implementations. Sunday is typically 0, with Saturday as 6. Many systems, including this tool, also accept 7 for Sunday.
How do I run a cron job every 2 hours?
Use 0 */2 * * * to run at minute 0 of every 2nd hour (midnight, 2 AM, 4 AM, and so on). Because 24 divides evenly by 2, the spacing stays even across midnight.
Why does my cron job run on days I didn't expect?
If you restrict both day of month and day of week, cron combines them with OR, not AND. For example 0 0 1 * 1 runs on the 1st of the month AND on every Monday, not only on Mondays that fall on the 1st. To require both conditions, restrict one field and check the other inside your script.
Can I run a cron job on the last day of the month?
Standard cron doesn't support 'last day of month' directly. You'll need a workaround script that checks the date, or an extended implementation such as Quartz that supports the L character.
Does */7 really run every 7 minutes?
Not across the hour boundary. Steps restart each cycle, so */7 fires at minutes 0, 7, 14, 21, 28, 35, 42, 49, and 56 — then the next run is at minute 0, only 4 minutes later. No list of minutes can fix that either, since 60 isn't a multiple of 7. Use a step that divides 60 evenly (5, 6, 10, 12, 15, 20 or 30), or move the job to a loop or a systemd timer if the exact interval matters.
Can cron run every 30 seconds (or every 10 seconds)?
Not directly — one minute is the smallest unit in standard cron. The usual workaround is two crontab lines that both run every minute, with the second one delayed: * * * * * /path/to/job and * * * * * sleep 30; /path/to/job. Every 10 seconds would need six lines with sleep 10 through 50, at which point a long-running loop or a scheduler with a seconds field (Quartz and Spring accept */30 * * * * *) is the better tool.
How do I run a cron job every two weeks?
Cron has no 'every N weeks': day-of-month steps restart on the 1st, so */14 doesn't give a clean fortnight. Run weekly and let the command skip alternate weeks: 0 9 * * 1 [ $(expr $(date +\%s) / 604800 \% 2) -eq 0 ] && /path/to/job splits Unix time into 7-day blocks and only runs in the even ones. The backslashes matter — crontab treats a bare % as a newline. The same trick with 86400 instead of 604800 gives every other day.
How do I run a cron job every 90 minutes?
No single expression can, because 90 doesn't divide an hour or a day evenly. Two lines cover it exactly: 0 0-21/3 * * * fires at 00:00, 03:00, 06:00 and so on, and 30 1-22/3 * * * fires at 01:30, 04:30, 07:30 and so on. Together that's every 90 minutes, including across midnight.
Where do I put a cron expression once I have it?
On Linux and macOS, run crontab -e to edit your user's crontab. Each line is an expression followed by the command, for example 0 3 * * * /usr/local/bin/backup.sh, and crontab -l lists what's installed. Cron doesn't load your shell profile, so use full paths. On CI and cloud platforms the expression goes into config instead — the export menu above formats it for GitHub Actions, Kubernetes, AWS EventBridge, and Vercel.
What timezone do cron expressions use?
Cron expressions have no timezone of their own — they're interpreted in whatever timezone the scheduler runs in, which is usually UTC on servers and CI platforms. GitHub Actions is always UTC. This calculator lets you preview run times in any timezone so you can check before you deploy.