Skip to content
Hoody.com

The Schedule Management endpoints let you list every @schedule directive registered in a container, manually trigger a scheduled fire, rescan the scripts directory to pick up directive changes, and inspect the historical log of fire attempts. Use these operations to monitor cron-like behavior, recover from a corrupted registration set, or run an on-demand job without waiting for the next cron tick.

All endpoints are mounted under the container-scoped exec service. The base URL follows the pattern https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.icu.

Returns every currently registered @schedule directive along with the computed next fire timestamp and the most recent fire metadata. The list reflects the in-memory registration set, refreshed on boot and after every reload.

GET /api/v1/exec/schedules/list

Terminal window
curl -X GET "https://proj-abc-cnt-xyz-exec-1.us-east.containers.hoody.icu/api/v1/exec/schedules/list" \
-H "Authorization: Bearer <token>"

Success. The body contains the registration snapshot.

Fires a registered @schedule script on demand and waits for the run to complete. The response includes the actual fire outcome — the request can succeed while the underlying fire errored or timed out.

POST /api/v1/exec/schedules/trigger

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

FieldTypeRequiredDescription
scriptPathstringYesScript path (absolute or relative to scripts-dir) of a script with a valid @schedule directive.
forcebooleanNoWhen true, bypass the @token refusal. Use with care — this fires the script as cron (no token auth). Default: false.
Terminal window
curl -X POST "https://proj-abc-cnt-xyz-exec-1.us-east.containers.hoody.icu/api/v1/exec/schedules/trigger" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"scriptPath": "default/nightly-cleanup.ts"
}'

Success. The fire ran to completion (or was intentionally skipped). Check status and triggered for the actual outcome.

Rescans the scripts directory, computes the diff against the current registration set, and applies it. Use dry_run: true to preview which scripts will be added, kept, or removed without touching the live schedule.

POST /api/v1/exec/schedules/reload

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

FieldTypeRequiredDescription
dry_runbooleanNoWhen true, compute the diff against the filesystem but do not apply. Returns the same shape with {added, kept, removed} lists. Default: false.
Terminal window
curl -X POST "https://proj-abc-cnt-xyz-exec-1.us-east.containers.hoody.icu/api/v1/exec/schedules/reload" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true
}'

Success. The diff (or the applied changes) is returned in the body. failed entries appear in both dry_run and apply responses.

Returns newest-first NDJSON entries from fires.log, one row per fire completion. Each entry records the wall-clock duration, status, and (when present) a truncated result preview or error message. Use includeRotated: true to also scan rotated fires.log.* files at the cost of a slower query.

GET /api/v1/exec/schedules/history

NameInTypeRequiredDescription
scriptPathquerystringNoFilter entries to a specific script (relative to scripts-dir). Optional.
sincequerystringNoISO 8601 lower bound on ts. Optional.
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://proj-abc-cnt-xyz-exec-1.us-east.containers.hoody.icu/api/v1/exec/schedules/history?scriptPath=default%2Fnightly-cleanup.ts&limit=50" \
-H "Authorization: Bearer <token>"

Success. The body contains the requested window of fire entries, newest first.