Cron Expressions Explained — Schedule Tasks Like a Pro

Cron expressions look cryptic but they're the standard way to schedule automated tasks. Learn the syntax with a visual builder.

If you've ever needed to run a script at 2 AM every Sunday, or process a database backup every 6 hours, you've encountered cron expressions. They look cryptic — 0 2 * * 0 — but they follow a simple pattern once you understand it.

The five fields

A standard cron expression has five fields, separated by spaces:

minute  hour  day-of-month  month  day-of-week
  0      2       *            *        0

This means: at minute 0, hour 2, any day of month, any month, on Sunday (0 = Sunday).

Special characters

* — Any value. * * * * * means every minute of every hour of every day.

*/n — Every n intervals. */15 * * * * means every 15 minutes.

, — Multiple values. 0 9,17 * * * means at 9 AM and 5 PM.

- — Range. 0 9-17 * * * means every hour from 9 AM to 5 PM.

Common examples

0 * * * * — Every hour on the hour

0 0 * * * — Every day at midnight

0 0 * * 1 — Every Monday at midnight

0 0 1 * * — First day of every month at midnight

*/5 * * * * — Every 5 minutes

0 9-17 * * 1-5 — Every hour during business hours, weekdays only

Build visually

Instead of memorizing syntax, use Toolozo's Cron Builder. Select the schedule you want from dropdowns and toggles, and see the cron expression generated in real-time. It also shows you the next execution times so you can verify it's correct before deploying.

Frequently Asked Questions

What does * mean in a cron expression?

An asterisk (*) means 'any value' or 'every'. For example, * in the hour field means every hour.

How do I run a cron job every 5 minutes?

Use the expression */5 * * * * — the */5 in the minute field means every 5 minutes.