Cron parse, humanize and next N runs

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/cron-explain · Id cron-explain

Parses a POSIX 5-field or Quartz 6/7-field cron expression (plus macros @yearly/@monthly/@weekly/@daily/@hourly), returns a plain-English summary and the next N scheduled runs in a given IANA timezone, and reports if the expression never fires or lands on a DST-ambiguous wall-clock. Handles step syntax, named months and days, Quartz '?'/L/W/# extensions, and the POSIX dom-OR-dow rule when both fields are restricted. Deterministic: no clock, no model; the `after` parameter is the anchor so output is reproducible.

What you get

Cron bugs ship silently until the job misses; this gives the same reading of the expression a reliable scheduler would, before deploy.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/cron-explain. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/cron-explain \
  -H 'content-type: application/json' \
  -d '{"expression":"0 0 29 2 *","timezone":"UTC","after":"2024-02-29T01:00:00Z","count":3}'

Input

FieldTypeRequiredDescription
expressionstring; length 0..200yesThe cron expression or macro, e.g. '*/15 9-17 * * 1-5' or '@weekly'.
flavorstring; one of "posix", "quartz"noWhich cron dialect. Defaults to posix (5 fields) or quartz (6/7 fields) based on token count.
timezonestring; length 0..60noIANA timezone name, e.g. 'America/Los_Angeles'. Defaults to UTC.
afterstring; length 0..40noISO-8601 instant: find runs strictly after this. Defaults to 1970-01-01T00:00:00Z.
countintegernoHow many future runs to return, 1-50. Default 5.

Example request body

{
  "expression": "0 0 29 2 *",
  "timezone": "UTC",
  "after": "2024-02-29T01:00:00Z",
  "count": 3
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
expressionstringno
validbooleanno
flavorstringno
humanizedstringno
timezonestringno
runsarray<string>noNext N occurrences as ISO-8601 instants.
neverFiresbooleanno
ambiguousDstarray<string>noRuns that land in a wall-clock interval that occurs twice (fall-back) or not at all (spring-forward).
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the calendar-deadline-kit package.

Machine-readable