ItsMyIp

Decode your cron expressions

Paste a crontab expression: every field translated into plain words, the next runs computed in your timezone — and the classic traps flagged.

Examples

01Reading a cron expression

A crontab line has five fields, left to right: minute (0-59), hour (0-23), day of month (1-31), month (1-12) and day of week (0-7, Sunday = 0 or 7). Each field accepts a value, a list (1,15), a range (8-18), a step (*/5) or the “all values” star. */15 8-18 * * 1-5 thus reads: every 15 minutes, from 8am to 6pm, Monday through Friday.

Next runs are computed in your browser, in your timezone — beware: the server that will run the task may use a different one (servers are often on UTC). A 0 9 * * * on a UTC server rings at 10am or 11am Paris time depending on the season.

02The syntax in detail

*
All values of the field. * in minute = every minute.
a-b
An inclusive range: 8-18 in hour = from 8am to 6pm. 1-5 in day of week = Monday through Friday.
*/n
A step: */5 in minute = every 5 minutes (0, 5, 10…). Also works on a range: 8-18/2.
a,b,c
A list: 0,30 in minute = at minute 0 and 30. Combinable with ranges and steps.
Names
Months and days accept three English letters: jan-dec, sun-sat. 0 9 * * mon-fri equals 0 9 * * 1-5.
@alias
@hourly (0 * * * *), @daily (0 0 * * *), @weekly (0 0 * * 0), @monthly (0 0 1 * *), @yearly (0 0 1 1 *), @reboot (at boot, not schedulable).

03The classic traps

The nastiest: when day of month and day of week are both specified, cron runs if either one OR the other matches — 0 0 13 * 5 runs on the 13th of every month AND every Friday, not only on Friday the 13th. Another big one: believing that a * minute with a precise hour means “once”: * 9 * * * runs 60 times, every minute from 9:00 to 9:59.

Also mind the server's timezone (often UTC), DST nights (a 2:30am task can skip or double), and cron's minimal environment: not your PATH nor your shell variables — the #1 cause of “works in my terminal but not in cron”. To schedule on Cloudflare Workers, Cron Triggers use this same syntax, always in UTC.

04Frequently asked questions

Why does my cron job run at the wrong time?

9 times out of 10: the timezone. This page computes in your browser's timezone, but the cron daemon uses the server's — very often UTC on cloud machines. Check with the date command on the server, and shift the expression accordingly (or set CRON_TZ / TZ when your cron supports it).

How do I run a task every 30 seconds?

Cron does not go below the minute. The classic workarounds: two identical lines, one prefixed with sleep 30; a loop inside the script itself; or a systemd timer (OnUnitActiveSec=30s), which is the intended tool on modern systems.

What does 0 0 13 * 5 mean exactly?

Midnight, on the 13th of every month OR every Friday — not “Friday the 13th”. When day of month and day of week are both restricted, the historic standard (vixie-cron) applies a logical OR. To really target Friday the 13th, test the day in the script: cron fires on the 13th, the script checks it is a Friday.

My script works by hand but not through cron. Why?

Cron launches tasks in a minimal environment: reduced PATH (often /usr/bin:/bin), none of your .bashrc variables, no terminal. Use absolute paths (/usr/local/bin/python3 rather than python3), set needed variables at the top of the crontab, and redirect output to a log file to see the actual error.

05More tools