What a Cron Job Expression Is
A cron expression is a short line of five fields that says when a task should run. Servers, CI systems and cloud schedulers read it and start the job at the matching minutes. This cron job expression generator lets you build one by choosing a schedule, then shows what it means in plain English so you can be sure before you save it.
The same page works as a decoder. Paste an expression you found in a config file and read the sentence, the field breakdown and the next run times. That is often quicker than counting stars in your head.
*/5 9-17 * * 1-5The line above reads as: every 5 minutes from 09:00 through 17:59, on Monday through Friday. The tool prints exactly that sentence for it.
The Five Fields in Order
The fields always come in the same order, separated by spaces. A mix-up in the order is the most common reason a job runs at the wrong time.
- Minute, from 0 to 59.
- Hour, from 0 to 23, on a 24 hour clock.
- Day of month, from 1 to 31.
- Month, from 1 to 12, or the names JAN to DEC.
- Day of week, from 0 to 6 with 0 as Sunday, or the names SUN to SAT. The number 7 also means Sunday.
A value of * means every value in that field. So 0 0 * * * is minute 0 of hour 0 on every day, which is midnight.
Lists, Ranges and Steps
Three small symbols cover almost every schedule. A comma lists values, a dash makes a range and a slash sets a step.
9,17in the hour field means 09:00 and 17:00.1-5in the day of week field means Monday through Friday.*/15in the minute field means every 15 minutes, at 0, 15, 30 and 45.10/20in the minute field starts at 10 and repeats every 20 minutes, so minutes 10, 30 and 50.8-18/2in the hour field means every second hour from 08 through 18.
Common Schedules Worked Out
These are the schedules people look up most. Each description below is produced by the tool, so you can paste the expression in and see the same result.
* * * * *: Every minute, every day. This is the cron expression for every minute.*/5 * * * *: Every 5 minutes, every day. Use it for a cron expression every 5 minutes.*/15 * * * *: Every 15 minutes, every day.0 * * * *: At minute 0 past every hour, every day. This is the cron job for every hour.0 9 * * 1-5: At 09:00, on Monday through Friday.0 0 1 * *: At 00:00, on day 1 of the month.0 0 1 */3 *: At 00:00, on day 1 of the month, every 3 months.
Some cron programs also accept shortcuts: @hourly, @daily, @weekly, @monthly and @yearly. This tool understands them and shows the five-field form they stand for.
Day of Month and Day of Week Together
This is the rule that surprises people. When both the day of month and the day of week are set to something other than *, standard cron runs the job when either one matches, not when both match.
So 0 0 15 * 5 does not mean the 15th when it is a Friday. It means midnight on the 15th of every month and also midnight on every Friday. The tool spells this out in the sentence and adds a note whenever both fields are set.
If you want a job on the first Monday of the month, a plain cron line cannot express it. A common workaround is to run the job every Monday and let the script check the date before it does anything.
Time Zones and Daylight Saving
A cron expression has no time zone of its own. The program that reads it decides. A crontab on a server normally follows the server's time zone, while many hosted schedulers, including the schedule trigger in GitHub Actions, run in UTC. Check your scheduler's documentation before you rely on a local hour.
The run times on this page can be shown in UTC or in your browser's time zone, which helps when you are comparing the two. Around a daylight saving change, an hour can be skipped or repeated in a local time zone, so a job set for that hour may run late, or not as often as you expect. Choosing UTC for the job avoids the problem.
Seconds, Quartz and Other Dialects
This tool reads standard cron with five fields. It also accepts six fields when you put the seconds first, which is the layout some schedulers use. In that case the breakdown gains a Second row and the run times include seconds.
It does not read Quartz-only symbols such as ?, L, W and #, and it does not read the extra year field some cloud schedulers add. When it meets one of these, it says which part it cannot read instead of guessing. Check the exact syntax your scheduler accepts, since dialects differ.
If your job is part of a data pipeline, the SQL Query Optimization tool can help with the queries it runs. When a schedule string has to sit inside a JSON config file, JSON Escape prepares it safely. For schedules passed in a web address, URL Encode handles the special characters.
Privacy
Everything on this page runs in your browser. The expression you type is not sent to a server and the schedule is calculated on your own device. The Privacy Policy describes what the site does and does not store.