{
    "name": "Cron Next Occurrence Calculator",
    "url": "https://calculators.geekmidst.com/calculators/cron-next-occurrence-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/cron-next-occurrence-calculator.md",
    "category": "IT, networking & security",
    "description": "Enter a five-field cron expression and a start time to list its next run times, with ranges, steps, names, @daily-style macros and the day-of-month/day-of-week rule.",
    "summary": "A cron expression has five fields: minute, hour, day of month, month and day of week. This lists the next run times after the moment you give, using the same rules as the standard Linux cron daemon.",
    "also_called": [
        "Crontab next run calculator",
        "Cron schedule tester"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "expression",
            "label": "Cron expression",
            "type": "text",
            "default": "0 9 * * 1-5"
        },
        {
            "name": "date",
            "label": "Start date",
            "type": "date",
            "default": "2026-10-29"
        },
        {
            "name": "time",
            "label": "Start time",
            "type": "time",
            "default": "10:00"
        },
        {
            "name": "count",
            "label": "Runs to list",
            "type": "number",
            "default": "5"
        }
    ],
    "outputs": [
        {
            "key": "next_run",
            "label": "Next run",
            "format": "text"
        },
        {
            "key": "minutes_until",
            "label": "Minutes from start",
            "format": "integer"
        },
        {
            "key": "runs_listed",
            "label": "Runs listed",
            "format": "integer"
        },
        {
            "key": "last_listed",
            "label": "Last run listed",
            "format": "text"
        }
    ],
    "formula": {
        "text": "A minute matches when minute, hour and month are in their sets and the day matches. Day rule (crontab(5)): if day-of-month or day-of-week starts with “*”, both must match; if both are restricted, either may match. Runs are listed strictly after the start minute.",
        "variables": {
            "Fields": "minute 0–59, hour 0–23, day of month 1–31, month 1–12 or JAN–DEC, day of week 0–7 or SUN–SAT (0 and 7 are Sunday)",
            "a-b/n": "every n-th value from a to b; * means first–last"
        }
    },
    "worked_example": {
        "inputs": {
            "expression": "0 9 * * 1-5",
            "date": "2026-10-29",
            "time": "10:00",
            "count": "5"
        },
        "steps": [
            "0 9 * * 1-5 means minute 0 of hour 9, Monday to Friday.",
            "Thursday 29 October 2026 at 10:00 is after 09:00, so today’s run has passed.",
            "The next run is Friday 30 October at 09:00, 23 hours = 1,380 minutes later."
        ],
        "result": "Starting Thursday 29 October 2026 at 10:00, “0 9 * * 1-5” next runs on Friday 30 October at 09:00."
    },
    "interpretation": "Check the listed times against your intent before deploying, especially when both day fields are set: “0 0 1 * 1” runs on the 1st and on every Monday, not only on Mondays that are the 1st.",
    "assumptions": [
        "Times are in the cron daemon’s own clock (its time zone); daylight-saving gaps and repeats are not modelled.",
        "Syntax follows Vixie cron / cronie as documented in crontab(5)."
    ],
    "limitations": [
        "Quartz and cloud schedulers with a seconds or year field, or L, W and # modifiers, use different syntax and are not supported."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "Why did my job run on a day I did not expect?",
            "answer": "When both day-of-month and day-of-week are restricted, cron runs when either matches. Make one of them * to require only the other."
        },
        {
            "question": "Does */2 in the day-of-month field count as restricted?",
            "answer": "In cronie it does not: the implementation checks only whether the field starts with *, so */2 is treated like * for the either-or rule. This calculator follows that behaviour."
        }
    ],
    "sources": [
        {
            "title": "crontab(5) manual page (cron, Debian)",
            "url": "https://manpages.debian.org/unstable/cron/crontab.5.en.html"
        }
    ],
    "related": [
        {
            "name": "Unix Epoch Converter",
            "url": "https://calculators.geekmidst.com/calculators/unix-epoch-converter"
        },
        {
            "name": "Time Duration Calculator",
            "url": "https://calculators.geekmidst.com/calculators/time-duration-calculator"
        },
        {
            "name": "Day of the Week Calculator",
            "url": "https://calculators.geekmidst.com/calculators/day-of-the-week-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}