Skip to content

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.

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.

Parameters

ParameterRequiredDefaultDescription
exprYes5-field cron expression (minute hour dom month dow). Example: */5 * * * *.
countNo5Number of upcoming execution timestamps to return (1–20).
fromNonowStart date for computing next runs (ISO 8601). Defaults to the current time.
timezoneNoUTCIANA timezone for computing and formatting timestamps (e.g. Europe/Paris).

Response Fields

FieldTypeDescription
expressionstringThe cron expression as provided
descriptionstringHuman-readable description (e.g. Every 5 minutes, At 09:00 daily)
timezonestringTimezone used for computation
nextstring[]Array of next execution timestamps in ISO 8601 format

Code Examples

curl -X GET \
  "https://api.sylvain.sh/v4/cron?expr=0+9+*+*+1-5"

Try It

Error Handling

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