Build a Cron Expression
Select a frequency and refine the schedule. The cron expression updates in real-time.
Common Cron Examples
Click any example to load it into the explainer.
Explain a Cron Expression
Paste a 5-field cron expression to get a plain English explanation and next run times.
Understanding Cron Syntax
What is Cron?
Cron is a time-based job scheduler found in Unix and Linux operating systems. System administrators and developers use cron to schedule commands or scripts to run at specific times, dates, or intervals. The schedule is defined using a cron expression -- a compact string of five fields that precisely describes when a job should execute.
The Five Fields
| Field | Allowed Values | Special Characters |
|---|---|---|
| Minute | 0-59 | * , - / |
| Hour | 0-23 | * , - / |
| Day of Month | 1-31 | * , - / |
| Month | 1-12 or JAN-DEC | * , - / |
| Day of Week | 0-6 or SUN-SAT (0=Sunday) | * , - / |
Special Characters
- * (asterisk) -- matches every possible value for that field
- , (comma) -- specifies a list of values, e.g.
1,3,5 - - (hyphen) -- specifies a range, e.g.
1-5means 1 through 5 - / (slash) -- specifies a step value, e.g.
*/10means every 10th unit
Common Cron Patterns
* * * * *-- every minute*/5 * * * *-- every 5 minutes0 * * * *-- every hour (at minute 0)0 0 * * *-- daily at midnight0 9 * * 1-5-- weekdays at 9:00 AM0 0 1 * *-- first day of every month at midnight0 0 1 1 *-- once a year on January 1st at midnight
How to Use the Cron Expression Generator
This tool helps developers, sysadmins, and DevOps engineers build and decode cron expressions without memorizing the syntax. Whether you are scheduling backups, log rotation, or periodic API calls, a correctly formed cron expression is essential for reliable automation on Linux and Unix systems.
Building an Expression Step by Step
Start by selecting a frequency from the dropdown -- Every Minute, Hourly, Daily, Weekly, Monthly, or Yearly. The builder dynamically reveals additional options based on your choice. For a daily job, you pick the hour and minute. For a weekly job, you also choose the day of the week. The generated expression updates in real time, and you can copy it with one click.
Explaining an Existing Expression
If you already have a cron expression from a crontab file or CI/CD config, paste it into the Explainer section. The tool parses all five fields and translates them into plain English, then calculates the next 10 run times so you can verify the schedule matches your intent. This is especially helpful when inheriting someone else's crontab.
Key Concepts to Know
A standard cron expression has five fields separated by spaces: minute, hour, day-of-month, month, and day-of-week. The asterisk (*) means "every," the slash (/) sets intervals, the comma (,) lists specific values, and the hyphen (-) defines ranges. Note that cron uses a 24-hour clock and months/days are 1-indexed, but days of the week start at 0 for Sunday.
Tips and Common Mistakes
- Forgetting that
0 */2 * * *runs at the top of every second hour, not every two hours from "now." - Confusing day-of-month and day-of-week -- setting both can produce unexpected overlaps.
- Cron has no built-in second-level granularity. If you need sub-minute scheduling, look at systemd timers or a task queue.
- Always consider the server's timezone. Cron runs in the system timezone unless your scheduler (like Kubernetes CronJob) overrides it.
Frequently Asked Questions
What is the difference between crontab and systemd timers?
Crontab is the traditional Unix scheduler that reads a table of cron expressions and runs commands on schedule. Systemd timers are the modern Linux alternative, offering better logging, dependency handling, and monotonic (elapsed-time) scheduling. Crontab is simpler and more portable; systemd timers are more powerful on systems that use systemd.
How do I run a cron job every weekday at 9 AM?
Use 0 9 * * 1-5. The 1-5 in the day-of-week field means Monday through Friday. Make sure the server's system clock is set to your expected timezone.
Can I use cron for tasks that run every 30 seconds?
Not directly. Cron's smallest unit is one minute. A common workaround is to create two cron entries -- one that runs the command normally and another that sleeps for 30 seconds first -- but this is fragile. For sub-minute precision, use systemd timers, a supervisor process, or a dedicated task scheduler.
Does this tool send my data to a server?
No. All expression building and parsing happens entirely in your browser using JavaScript. Nothing is transmitted over the network. You can verify this by inspecting the network tab in your browser's developer tools.
What timezone do the "Next Run Times" use?
The next run times are calculated using your browser's local timezone. If you deploy a cron job on a remote server, the actual run times will follow that server's system timezone instead.