Docspira

Cron Expression Generator & Parser

Paste a cron expression, understand it, and check exactly when it will run before you deploy. Everything runs locally in your browser.

Cron expression

Minute
0–59
Hour
0–23
Day of month
1–31
Month
1–12
Day of week
0 or 7 = Sunday

Quick presets

Builder

Use *, lists, ranges and steps such as */5 or 1-5.

Explanation

—

Next 5 runs

Timezone:

    Nothing you enter here is sent to Docspira. Learn more.

    About cron expressions

    A cron expression is a compact schedule for recurring jobs. This tool uses standard five-field Unix cron. Verify the timezone and the next runs shown here against the scheduler you will deploy to: cron dialects can differ, especially in their number of fields and how day-of-month and day-of-week are combined.

    What this tool does

    Build and explain a five-field Unix cron expression.

    The five fields

    ┌───────────── 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 both Sunday, or SUN to SAT)
    │ │ │ │ │
    * * * * *
    
    Symbol Meaning Example
    * Every value * in the hour field: every hour
    , A list 1,15 in day of month: the 1st and the 15th
    - A range 1-5 in day of week: Monday to Friday
    / A step */15 in minutes: every 15 minutes (0, 15, 30, 45)

    Cron expressions people search for

    Every "next run" below was computed with the same cron engine this generator uses.

    Expression Runs
    * * * * * Every minute
    */5 * * * * Every 5 minutes
    */15 * * * * Every 15 minutes, at :00, :15, :30 and :45
    0 * * * * Every hour, on the hour
    0 */6 * * * Every 6 hours: 00:00, 06:00, 12:00, 18:00
    0 0 * * * Every day at midnight
    30 2 * * * Every day at 02:30
    0 9 * * 1-5 Weekdays at 09:00
    0 18 * * 5 Fridays at 18:00
    0 0 * * 0 Sundays at midnight
    0 0 1 * * The 1st of every month at midnight
    0 0 1 1 * Once a year, January 1st at midnight
    0 8-17 * * 1-5 Every hour from 08:00 to 17:00 on weekdays

    The day-of-month and day-of-week trap

    When both day fields are restricted, standard cron runs when either one matches, not both. So:

    0 0 13 * 5
    

    does not mean "Friday the 13th". It means "every 13th of the month and every Friday". Starting from late September 2026, its next runs are October 2, October 9, October 13 and October 16. If you want only Friday the 13th, schedule 0 0 13 * * and check the weekday inside your script.

    Other things that catch people out

    Minute * with a fixed hour. * 9 * * * runs 60 times, every minute from 09:00 to 09:59. For once at 9 AM, use 0 9 * * *.

    Steps restart each hour or day. */45 * * * * runs at :00 and :45, then :00 again. The gap alternates between 45 and 15 minutes; cron can't do "every 45 minutes" across hour boundaries.

    Impossible dates never run. 0 0 31 2 * (February 31st) is rejected here because it would never fire. 0 0 31 * * runs only in the seven months that have 31 days.

    Timezone. Cron runs in the scheduler's timezone, which is often UTC on servers and in CI. 0 9 * * * on a UTC server is 06:00 in São Paulo and 05:00 in New York during daylight time. Check the next runs above in the timezone your scheduler actually uses.

    Daylight saving. On the night clocks change, a job scheduled inside the skipped hour may not run, and one inside the repeated hour may run twice, depending on the scheduler. Avoid scheduling important jobs between 01:00 and 03:00 local time.

    Not every "cron" is this cron

    This generator produces standard five-field Unix cron, the format used by crontab, Kubernetes CronJobs and GitHub Actions. Other schedulers use extended dialects:

    Scheduler Format What's different
    Linux crontab, Vixie cron 5 fields Standard. Also accepts @daily, @hourly, @reboot shortcuts
    Kubernetes CronJob 5 fields Standard. Runs in the controller's timezone unless spec.timeZone is set
    GitHub Actions schedule 5 fields Standard, always UTC. Runs can be delayed at busy times
    Quartz, Spring @Scheduled 6 or 7 fields A seconds field comes first. Uses ? for "no specific value"
    AWS EventBridge 6 fields Adds a year field. Requires ? in one of the two day fields

    Pasting a Quartz or AWS expression here will be reported as the wrong number of fields. Special characters like L (last day), W (nearest weekday) and # (nth weekday) belong to those extended dialects and aren't part of standard cron.

    FAQ

    How do I run a cron job every 30 seconds?

    Standard cron can't: its smallest unit is one minute. Either run a loop with sleep 30 inside a job that starts every minute, or use a scheduler with a seconds field (Quartz, Spring, systemd timers).

    How do I run a job on the last day of the month?

    Standard cron has no "last day". Schedule 0 0 28-31 * * and have the script exit unless tomorrow is the 1st, for example with [ "$(date -d tomorrow +%d)" = "01" ] on GNU/Linux.

    Is Sunday 0 or 7?

    Both. 0 and 7 both mean Sunday in standard cron. Monday is 1.

    Why didn't my cron job run?

    The most common causes: the scheduler uses a different timezone than you assumed; the job ran but failed (cron jobs get a minimal PATH and environment, so commands that work in your terminal can fail); or, for crontab, the file is missing a final newline.

    Does this tool run my jobs?

    No. It builds and explains the expression and shows the next run times. Your server, CI or scheduler runs the job.

    Before you start

    Confirm whether your scheduler uses Unix cron or a different dialect, then review the next run times in the intended timezone.

    Privacy

    This tool runs in your browser; the text or file you choose is not uploaded for processing. Read the privacy details.