Cron Expression
Generate or parse Cron, plain-language explanation, next 5 run times
┌──────────── [optional] seconds (0 - 59) | ┌────────── minute (0 - 59) | | ┌──────── hour (0 - 23) | | | ┌────── day of month (1 - 31) | | | | ┌──── month (1 - 12) OR jan,feb,mar,apr ... | | | | | ┌── day of week (0 - 6, sunday=0) OR sun,mon ... | | | | | | * * * * * * command
| Symbol | Meaning | Example | Equivalent |
|---|---|---|---|
| * | Any value | * * * * | Every minute |
| - | Range of values | 1-10 * * * | Minutes 1 through 10 |
| , | List of values | 1,10 * * * | At minutes 1 and 10 |
| / | Step values | */10 * * * | Every 10 minutes |
| @yearly | Once every year at midnight of 1 January | @yearly | 0 0 1 1 * |
| @annually | Same as @yearly | @annually | 0 0 1 1 * |
| @monthly | Once a month at midnight on the first day | @monthly | 0 0 1 * * |
| @weekly | Once a week at midnight on Sunday morning | @weekly | 0 0 * * 0 |
| @daily | Once a day at midnight | @daily | 0 0 * * * |
| @midnight | Same as @daily | @midnight | 0 0 * * * |
| @hourly | Once an hour at the beginning of the hour | @hourly | 0 * * * * |
| @reboot | Run at startup |
| Position | Field | Allowed values | Special symbols |
|---|---|---|---|
| 1 | Minute | 0 - 59 | , - * / |
| 2 | Hour | 0 - 23 | , - * / |
| 3 | Day of month | 1 - 31 | , - * / ? L W |
| 4 | Month | 1 - 12 | , - * / |
| 5 | Day of week (0–6, Sun–Sat) | 0 - 6 (Sun-Sat) | , - * / ? L # |
* (All values): Runs every minute/hour/day etc. E.g. * * * * * means every minute.
/ (Step): */15 means every 15 units. E.g. */15 * * * * is every 15 minutes; 0 */2 * * * is every 2 hours.
L (Last): Supported in some Cron implementations only; e.g. L in day = last day of month. Standard crontab may not support L.
What is a Cron expression?
Cron is a scheduling format used by Linux crontab and many job schedulers to run commands periodically. Use this tool to generate or parse Cron expressions, understand them in plain language, and preview the next run times.
What this tool can do
- Explain a Cron expression in plain language (localized).
- Preview the next 5 run times for your expression.
- Quick-fill common scenarios with presets.
- Use a syntax quick reference and special symbols guide.
Common use cases
- Daily backups / log cleanup
- Scheduled API pings / health checks
- Hourly service restarts
- Monthly reports and end-of-month tasks
Frequently Asked Questions
What timezone does Crontab use?
Crontab uses the server system time (often UTC), not your local time. Set TZ=Asia/Shanghai (or similar) in the job if needed.
Why does my script work in terminal but not in Cron?
Cron runs with a minimal PATH and different working directory. Use absolute paths for commands or set PATH at the top of your script.
How do I check if my Cron job ran?
Redirect stdout/stderr to a log file so you can verify execution and debug failures.
* * * * * /path/to/script.sh >> /var/log/cron.log 2>&1
Why do some examples have 5 fields and others 6?
Standard crontab uses 5 fields (min hour dom month dow). Some schedulers support an extra seconds field, making 6 fields.
Do @daily / @hourly shortcuts work everywhere?
Not always. Some cron implementations support these special strings, others only accept the numeric fields format.
Why are next run times different from what I expect?
Timezones, daylight saving time (DST), and server locale settings can change the actual trigger times. Always validate on the target server environment.