API Depot/APIs/Cron Expression Parser

Cron Expression Parser

live

Parse a cron expression into a plain-English description and get the next N and previous N scheduled run timestamps in your timezone.

POST /v1/cron/parsePer request

Request

FieldTypeDescription
expression*string5-field cron expression (min hour dom month dow)
timezonestringIANA timezone name (default: UTC)
next_nintegerNumber of upcoming runs to return (default: 5, max: 20)
prev_nintegerNumber of past runs to return (default: 3, max: 20)

Response

FieldTypeDescription
validbooleanTrue if the expression is a valid cron string
expressionstringThe expression as submitted
descriptionstringHuman-readable schedule description (or parse error if invalid)
timezonestringTimezone used for run timestamps
next_runsstring[]ISO 8601 timestamps of upcoming runs (chronological order)
prev_runsstring[]ISO 8601 timestamps of past runs (most-recent first)

Example

Request

{
  "expression": "0 9 * * 1-5",
  "timezone": "Europe/Lisbon",
  "next_n": 5,
  "prev_n": 3
}

Response

{
  "valid": true,
  "expression": "0 9 * * 1-5",
  "description": "At 09:00 AM, Monday through Friday",
  "timezone": "Europe/Lisbon",
  "next_runs": [
    "2026-03-30T09:00:00+01:00",
    "2026-03-31T09:00:00+01:00",
    "2026-04-01T09:00:00+01:00",
    "2026-04-02T09:00:00+01:00",
    "2026-04-03T09:00:00+01:00"
  ],
  "prev_runs": [
    "2026-03-27T09:00:00+00:00",
    "2026-03-26T09:00:00+00:00",
    "2026-03-25T09:00:00+00:00"
  ]
}

Notes

  • Sync endpoint — pure computation, under 20ms.
  • Standard 5-field cron only — no seconds field, no @reboot or @hourly macros.
  • An invalid expression returns valid: false with the parse error in description — not an HTTP error.
  • Timestamps are ISO 8601 with timezone offset relative to the requested timezone.

Try it