Cron expression explainer

Type a cron expression to see what it means in plain words and when it will next run. Click an example to start.

Every 5 minutes.
Minute
*/5
Hour
*
Day of month
*
Month
*
Day of week
*

Next 5 runs (UTC)

    Cron uses the clock of the machine it runs on. If your server is not set to UTC, shift these times by its offset.

    Free, with no sign-up.

    The five fields

    A cron expression is five values separated by spaces. Each one limits when the job runs.

    ┌───────── minute        (0 to 59)
    │ ┌─────── hour          (0 to 23)
    │ │ ┌───── day of month  (1 to 31)
    │ │ │ ┌─── month         (1 to 12, or JAN to DEC)
    │ │ │ │ ┌─ day of week   (0 to 7, 0 and 7 are Sunday, or SUN to SAT)
    │ │ │ │ │
    * * * * *

    The job runs at every minute where all five fields match the clock.

    The symbols

    SymbolMeaningExample
    *Every value.* * * * * runs every minute.
    ,A list.0 9,17 * * * runs at 09:00 and 17:00.
    -A range.0 9 * * 1-5 runs at 09:00, Monday to Friday.
    /A step.*/15 * * * * runs every 15 minutes.

    Shortcuts also work: @hourly, @daily, @weekly, @monthly and @yearly.

    Three things that catch people out

    1. Day of month and day of week are joined by "or". 0 0 13 * 5 does not mean "Friday the 13th". It runs on every 13th and on every Friday.
    2. Steps restart each hour or day. */40 * * * * runs at minute 0 and minute 40 of every hour, so the gaps are 40 and then 20 minutes.
    3. The time zone is the server's. A job set for 09:00 on a server in UTC runs at 10:00 or 11:00 in much of Europe, and it shifts by an hour when the clocks change.

    Knowing the job actually ran

    A correct schedule only says when cron will start the job. It does not tell you the job finished. Scripts fail without a sound: a full disk, an expired password, a server that was rebooted and never started cron again.

    The usual fix is a heartbeat. The job requests a URL when it finishes, and a monitor alerts you when that request does not arrive on time.

    30 2 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 https://pulsx.net/api/beat/your-token

    PULSX heartbeat monitors do this for free.

    Full guide: Cron job monitoring: how to know when a job fails

    Common questions

    What does */5 * * * * mean?+
    Every 5 minutes: at minute 0, 5, 10 and so on of every hour, every day.
    How do I run a cron job every 30 seconds?+
    Cron cannot do it. The smallest step is one minute. The usual workaround is two entries for the same minute, the second starting with "sleep 30;", or a systemd timer, which supports seconds.
    Does this tool support a seconds or year field?+
    No. It reads the standard 5-field format used by crontab on Linux and macOS, by Kubernetes CronJobs and by GitHub Actions. Quartz and some other schedulers use 6 or 7 fields with different rules.
    Why did my job not run at the time shown here?+
    The times here are in UTC. Cron uses the server's own clock and time zone. Run the "date" command on the server to see its time, and check the cron log for the job.

    More free tools

    A tool checks once. A monitor checks every minute.

    PULSX watches your site, DNS, SSL certificate and cron jobs every 60 seconds and alerts you when one fails. Free for 20 monitors, with no card.