Skip to content

The schedule management endpoints let you inspect, trigger, and refresh @schedule directives registered by the exec runtime. Use these to audit active cron jobs, review historical fires, reload registrations after script changes, and trigger an immediate fire for testing or recovery.

Returns every currently registered @schedule directive, with the computed next fire time and the most recent fire outcome for each.

This endpoint takes no parameters.

Terminal window
curl -X GET "https://api.example.com/api/v1/exec/schedules/list" \
-H "Authorization: Bearer <token>"

Returns newest-first NDJSON entries from the fires log. Use the query parameters to narrow the window to a specific script or a time range, and to opt into scanning rotated log files.

NameInTypeRequiredDescription
scriptPathquerystringNoFilter entries to a specific script (relative to scripts-dir).
sincequerystringNoISO 8601 lower bound on ts.
limitqueryintegerNoMax entries to return. Default 100, hard max 1000.
includeRotatedquerybooleanNoWhen true, also scan rotated fires.log.* files (slower). Default false.
Terminal window
curl -X GET "https://api.example.com/api/v1/exec/schedules/history?scriptPath=default/cron/cleanup.ts&limit=50" \
-H "Authorization: Bearer <token>"

Rescans the scripts directory and reconciles the registered schedules against the current filesystem contents. Pass dry_run: true to preview the diff (added, kept, removed) without applying it.

This endpoint takes no query, path, or header parameters.

NameTypeRequiredDefaultDescription
dry_runbooleanNofalseWhen true, compute the diff against the filesystem but do not apply. Returns the same shape with added, kept, removed lists.
Terminal window
curl -X POST "https://api.example.com/api/v1/exec/schedules/reload" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"dry_run": true}'

Manually fires a registered schedule once. Useful for replaying a missed fire or testing a cron expression outside its natural cadence.

This endpoint takes no query, path, or header parameters.

NameTypeRequiredDefaultDescription
scriptPathstringYesScript path (absolute or relative to scripts-dir) of a script with a valid @schedule directive.
forcebooleanNofalseWhen true, bypass the @token refusal. Use with care — this fires the script as cron (no token auth).
Terminal window
curl -X POST "https://api.example.com/api/v1/exec/schedules/trigger" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"scriptPath": "default/cron/cleanup.ts", "force": false}'