Skip to main content
ToolsBay

Cron Expression Generator

Build and read cron schedules without memorising the syntax.

Runs entirely in your browser — nothing is uploaded

* * * * *

Every minute.

Common schedules

Frequently asked questions

What do the five fields mean?

In order: minute (0-59), hour (0-23), day of month (1-31), month (1-12) and day of week (0-7, where both 0 and 7 mean Sunday). An asterisk means "every".

What is the difference between */15 and 0,15,30,45?

For the minute field, nothing — both run at 0, 15, 30 and 45. The step form is shorter and adjusts automatically if you change the range it applies to.

What happens if I set both day of month and day of week?

They combine with OR, not AND, which surprises almost everyone. "0 0 1 * 1" runs on the 1st of the month AND every Monday, not only on Mondays that fall on the 1st.

Which timezone does cron use?

The server's local timezone, unless the daemon or scheduler is configured otherwise. That matters twice a year: a job scheduled at 2:30am may run twice or not at all when clocks shift.

Reading a cron expression

Cron syntax is five space-separated fields describing when a job should run. Each field accepts an asterisk for “every”, a single number, a comma-separated list, a range with a hyphen, or a step with a slash. They combine, so 0 9-17/2 * * 1-5 means every two hours between 9am and 5pm on weekdays.

The day-of-month and day-of-week trap

This is the one that catches experienced people. When both the day-of-month and day-of-week fields are restricted, cron runs the job if either matches, not both. 0 0 13 * 5 runs on the 13th of every month and on every Friday — not only on Friday the 13th. If you need an AND, leave one field as * and check the other condition inside your script.

Practical advice

  • Avoid scheduling everything at 0 0. Spreading jobs across the hour keeps a server from being hammered on the hour, every hour.
  • Be careful in the 1am–3am window if your server observes daylight saving. A job at 2:30am can run twice or be skipped entirely.
  • Cron does not prevent overlap. If a job takes longer than its interval, you get two copies running — use a lock file if that matters.

To convert the timestamps that appear in job logs, use the Unix timestamp converter.

All developer tools