Limited Time Offer: 40% off

Free tool

Cron Expression Builder

Type a cron expression and read it back in plain English, with the next run times worked out for you. Start from a preset or write your own. Everything runs in your browser.

Preset
minutehourday (month)monthday (week)
Meaning

At 09:00 on Monday, Tuesday, Wednesday, Thursday, and Friday.

Next runs (UTC)

No run times in the next few years.

Parsed in your browser. Run times are shown in UTC.

Five fields, one schedule

Cron syntax is compact, which makes it quick to write and easy to misread. 30 2 * * 0 looks like a handful of numbers until you realise it means half past two on Sunday morning. Getting the reading wrong is how a job meant for once a week ends up running every day.

This builder removes the doubt. As you type, it translates the expression into a sentence and lists the next times it will fire, so you can confirm the schedule before you commit it to a server or a migration.

The pieces of an expression

The five fields are minute, hour, day of the month, month, and day of the week, in that order. Within a field, an asterisk means every value, 1-5 is a range, 1,15 is a list, and */10 is a step that fires every tenth value. Months and weekdays also accept short names like JAN and MON.

One rule catches people out. When both the day-of-month and day-of-week fields are set, cron runs when either matches, not only when both do. This tool applies that same behaviour, so the run times you see match what a real scheduler would do.

Cron in the database

Cron is not just for the operating system. PostgreSQL schedules jobs with pg_cron using the exact same five-field syntax, so you can run a cleanup query or refresh a materialized view on a timer without leaving the database. An expression that reads correctly here is the one you hand to cron.schedule.

The run times here are in UTC, which is how many schedulers are configured, though it is worth confirming the timezone of your own server. Nothing you type leaves your browser.

Frequently asked questions

How do I read a cron expression?
A cron expression has five fields separated by spaces: minute, hour, day of the month, month, and day of the week. Each field holds a number, a range like 1-5, a list like 1,15, a step like */5, or an asterisk meaning every value. So 0 9 * * 1-5 means at 09:00 on Monday through Friday.
What do the special characters mean?
An asterisk matches every value in a field. A hyphen sets a range, so 1-5 in the weekday field means Monday to Friday. A comma lists values, such as 0,30 in the minute field. A slash sets a step, so */15 in the minute field means every fifteen minutes.
How do the day-of-month and day-of-week fields interact?
When both fields are restricted, cron treats them as an OR, not an AND. For example 0 0 1 * 1 runs on the first of the month and also on every Monday. If only one of the two is set, only that one applies. This tool follows that same rule when it lists the next run times.
What timezone are the run times in?
The next run times shown here are in UTC. Many schedulers run in UTC by default, so it is a safe reference, but check your own system. A server set to a local timezone will fire at those clock times in its own zone.
Does this work with pg_cron?
Yes. pg_cron, the PostgreSQL job scheduler, uses standard five-field cron syntax, so an expression that reads correctly here is the same one you pass to cron.schedule. pg_cron runs its jobs in the timezone of the database server.
Is my expression sent anywhere?
No. The parsing and the run-time calculation happen in your browser, so nothing is uploaded. You can paste an expression from a private system and read it safely.

More free tools

Schedule database jobs with DB Pro

Once you have the schedule right, you need a place to run the query it triggers. DB Pro is a desktop database client for macOS, Windows, and Linux where you can write and test that query against PostgreSQL, MySQL, SQLite, and more before it goes on a timer.

Browse the other free tools, or read the database tutorials and cheat sheets.