How a cron expression builder helps
A cron expression builder turns a schedule like "every weekday at 9 AM" into the five-field syntax that cron understands, and does the reverse for expressions you inherit. Cron is the scheduler behind backups, report emails, cache warmers, WordPress cron replacements and most hosting control panels, including Hostinger's. The syntax is short and unforgiving: 0 9 * * 1-5 and 9 0 * * 1-5 look nearly identical but run nine hours apart. Reading the plain-English description and the upcoming run times is the quickest way to be sure.
Cron syntax in one table
┌───────── minute 0-59 │ ┌─────── hour 0-23 │ │ ┌───── day of month 1-31 │ │ │ ┌─── month 1-12 or JAN-DEC │ │ │ │ ┌─ day of week 0-7 or SUN-SAT (0 and 7 are Sunday) │ │ │ │ │ 0 9 * * 1-5 /usr/bin/php /home/site/cron/report.php
*means every value in the field.,lists values:0,30is minute 0 and minute 30.-is an inclusive range:9-17is 9 AM through 5 PM./is a step:*/15is every 15th value,9-17/2is 9, 11, 13, 15 and 17.@hourly,@daily,@weekly,@monthly,@yearlyand@rebootare shortcuts most cron versions accept.
Using the builder
- Start from a preset or paste an existing expression into the box. Names like
MON-FRIandJANare accepted in any case. - Pick a field from the five tiles under the description, then choose every, specific values, a range or a step. The expression updates as you click.
- Read the description. If it does not say what you meant, the schedule is wrong, no matter how plausible the expression looks.
- Check the next 10 runs in your local time or in UTC. Most servers run cron in UTC, so the UTC view is often the one that matters.
- Add your command to get a complete crontab line, then paste it into
crontab -eor your host's cron job panel.
Examples you can copy
*/5 * * * * every 5 minutes 0 * * * * every hour, on the hour 30 2 * * * every day at 02:30 0 9 * * 1-5 weekdays at 09:00 */15 9-17 * * 1-5 every 15 minutes during business hours 0 0 1 * * midnight on the 1st of each month 0 0 1 */3 * quarterly, on the 1st of Jan, Apr, Jul and Oct 0 3 * * 0 Sundays at 03:00 0 0 1 1 * once a year, January 1 at midnight
Gotchas that catch everyone
Day of month OR day of week
If both day fields are restricted, cron runs when either matches. 0 9 13 * 5 is not "Friday the 13th"; it runs on every 13th and on every Friday. The builder's description and run list both show this, so you will see it before it surprises you.
The server's time zone
Cron uses the system clock of the machine it runs on. A job set for 0 9 * * * on a UTC server fires at 9 AM UTC, which is 4 or 5 AM in New York depending on daylight saving. Jobs scheduled between 1 and 3 AM local time can be skipped or run twice on the nights clocks change. Use UTC for anything important, and use the timestamp converter to translate the times for your team.
A different environment
Cron runs commands with a minimal PATH and no login shell, so a script that works in your terminal can fail silently. Use full paths, and capture output with >> /home/site/cron.log 2>&1 so failures leave a trace. A bare % in a crontab line means a new line, so escape it as \% in commands like date +\%F.
Hitting a URL instead of a script
Many hosts let you schedule curl https://example.com/cron.php. Anyone else can request that URL too, so protect it with a secret token or restrict it by IP with rules from the .htaccess generator.
Quartz, Spring and other cron flavors
This builder follows standard Unix cron (Vixie cron and cronie), which is also what Linux servers, cPanel, Hostinger, GitHub Actions and Kubernetes CronJobs use. Some schedulers extend it. Quartz and Spring add a seconds field at the start, so their expressions have six or seven fields, as in 0 0 9 ? * MON-FRI. They also use ? for "no specific value" in one of the day fields, and support L (last day), W (nearest weekday) and # (such as 6#3 for the third Friday). Quartz numbers the days of the week 1 to 7 starting with Sunday, not 0 to 6. AWS EventBridge uses six fields with a year at the end. If you paste a six-field expression here, the builder tells you which flavor it looks like; drop the seconds field to convert it to standard cron.
Frequently asked questions
What do the five fields in a cron expression mean?
From left to right: minute (0 to 59), hour (0 to 23), day of the month (1 to 31), month (1 to 12 or JAN to DEC) and day of the week (0 to 7 or SUN to SAT, where both 0 and 7 mean Sunday). A job runs when the current time matches every field.
How do I run a cron job every 5 minutes?
Use */5 * * * *. The */5 in the minute field means every fifth minute starting from 0, so the job runs at :00, :05, :10 and so on, every hour of every day.
What time zone does cron use?
Classic cron uses the system time zone of the server, which on most cloud servers is UTC. Some implementations accept a CRON_TZ or TZ variable in the crontab, and hosted schedulers such as GitHub Actions always use UTC. Check before scheduling anything for a specific local time.
Why does my cron job run on more days than I expected?
When both the day of month and the day of week fields are restricted, standard cron runs the job if either one matches, not both. 0 9 1 * 1 runs on the 1st of every month and also on every Monday. To get the first Monday only, schedule 0 9 1-7 * * and check the weekday inside your script.
Can cron run a job every 30 seconds?
Not directly. The smallest unit in standard cron is one minute. A common workaround is two entries, one running the command and one running sleep 30 followed by the command. Schedulers with a seconds field, such as Quartz or Spring, can do it natively.