Skip to content
moxon home

Cron Expression Parser

The /cron endpoint parses a 5-field cron expression and returns a human-readable description along with the next scheduled execution timestamps.

gethttps://api.moxon.dev/v4/cron

Use Cases

Preview upcoming job runs before scheduling a task, display a human-readable description of a cron expression in a UI, debug cron timing issues across time zones, or validate that an expression fires at the expected intervals.

Try itget/v4/cron

Parameters

  • exprstringrequired

    5-field cron expression (minute hour dom month dow). Example: */5 * * * *.

  • countnumberoptional

    Default: 5.

    Number of upcoming execution timestamps to return (1–20).

  • fromstringoptional

    Default: now.

    Start date for computing next runs (ISO 8601). Defaults to the current time.

  • timezonestringoptional

    Default: UTC.

    IANA timezone for computing and formatting timestamps (e.g. Europe/Paris).

    • UTC
    • Europe/Paris
    • America/New_York
    • Asia/Tokyo
    • Australia/Sydney

Response Fields

  • expressionstring

    The cron expression as provided

  • descriptionstring

    Human-readable description (e.g. Every 5 minutes, At 09:00 daily)

  • timezonestring

    Timezone used for computation

  • nextstring[]

    Array of next execution timestamps in ISO 8601 format

Code Examples

Error Handling

  • 400Please provide a cron expression (?expr=...)The expr parameter is missing
  • 400Invalid cron expressionThe expression does not match the 5-field cron format
  • 400Count must be between 1 and 20The count parameter is out of the allowed range
  • 400Please provide a valid ISO 8601 date (?from=...)The from parameter is not a valid ISO 8601 date
  • 400Please provide a valid timezone (?timezone=...)The timezone parameter is not a valid IANA timezone