RunToolz iconRunToolz
Welcome to RunToolz!
CronAutomationDevOps

Cron Expressions: Schedule Anything Without the Guesswork

Those cryptic scheduling strings finally explained. Write cron expressions that work the first time.

RunToolz TeamJanuary 25, 20263 min read

0 0 * * * — what does that mean?

If you've used AWS Lambda, GitHub Actions, or any task scheduler, you've seen cron expressions. Five or six cryptic fields that somehow schedule jobs.

They're not as complicated as they look.

The Five Fields

┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6, Sunday = 0)
│ │ │ │ │
* * * * *

Each field limits when the job runs. A * means "every." A number means "only that value."

Ready to try it yourself?Parse Cron Expression

Reading Examples

0 0 * * * — Minute 0, hour 0, any day, any month, any weekday = Midnight every day

30 8 * * 1-5 — 8:30 AM, Monday through Friday = Weekday mornings

0 */2 * * * — Every 2 hours = 2 AM, 4 AM, 6 AM...

0 9 1 * * — 9 AM on the 1st of every month = Monthly report time

Special Characters

* — Every value (every minute, every hour, etc.)

, — Multiple values. 1,15 means the 1st and 15th.

- — Range. 1-5 means 1 through 5.

/ — Step. */15 means every 15. */15 in the minute field = every 15 minutes.

Common Patterns

Every 5 minutes: */5 * * * *

Every hour at :30: 30 * * * *

Daily at 3 AM: 0 3 * * *

Weekly on Sunday at midnight: 0 0 * * 0

First day of month at 9 AM: 0 9 1 * *

Weekdays at 6 PM: 0 18 * * 1-5

The Gotchas

Day of week vs day of month. If you set both, most systems OR them together. 0 0 1 * 1 runs on the 1st AND every Monday, not just Mondays that are the 1st.

Timezone matters. Most cron systems use server time or UTC. Know which one you're dealing with.

6-field vs 5-field. Some systems add a seconds field at the beginning. 0 0 0 * * * would be midnight with a seconds field.

Sunday = 0 or 7. Depends on the system. Both usually work for Sunday.

Testing Before Deploying

Don't guess whether 0 0 */2 * * runs every 2 days or every 2 hours. Use a cron parser.

Run through a few expected trigger times. Make sure they match your intention.

For critical jobs, set up monitoring. A cron expression that's off by one field can run your daily job hourly—or your hourly job yearly.

Alternatives to Cron

English syntax. Some schedulers accept "every day at 3pm" instead of 0 15 * * *. Clearer but less portable.

Rate expressions. AWS uses rate(5 minutes) alongside cron expressions. Easier for simple intervals.

Systemd timers. Linux alternative to cron with better logging and dependency management.


Cron expressions are dense but learnable. Five fields, each limiting when jobs run. Test your expressions, watch your timezones, and you'll schedule anything reliably.