Skip to content
Hoody.com

The scheduling service registers @schedule directives found in scripts under /hoody/storage/hoody-exec/scripts, fires them on a cron expression in UTC, and records every fire in fires.log. Use these endpoints to inspect what is currently scheduled, reload registrations after a script change, trigger a fire on demand, and read historical outcomes.

All requests target the exec container hostname and require a Bearer token.

Return every currently registered @schedule directive with its computed next fire and last fire summary. Use this to see what the scheduler is currently tracking after boot or after a reload.

This endpoint takes no parameters.

Terminal window
curl -X GET "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.com/api/v1/exec/schedules/list" \
-H "Authorization: Bearer <token>"

Read past fire records from fires.log (newest-first). Use this to audit recent cron runs, debug a failure, or scan rotated files when investigating older 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://{projectId}-{containerId}-exec-1.{server}.containers.hoody.com/api/v1/exec/schedules/history?scriptPath=default/1/cron/nightly-report.ts&limit=50" \
-H "Authorization: Bearer <token>"

Fire a registered @schedule directive on demand without waiting for its next cron time. The script runs as if cron fired it, so it does not pass through @token checks unless force is set. Returns the actual outcome of the fire attempt, including skip reasons such as overload or stale generation.

This endpoint takes no parameters.

NameTypeRequiredDescription
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://{projectId}-{containerId}-exec-1.{server}.containers.hoody.com/api/v1/exec/schedules/trigger" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"scriptPath": "default/1/cron/nightly-report.ts"
}'

Rescan the scripts directory, pick up new @schedule directives, drop registrations for deleted scripts, and refresh existing ones. Use this after editing a script’s @schedule line or after pulling new scripts into /hoody/storage/hoody-exec/scripts. Set dry_run: true to preview the diff before applying.

This endpoint takes no parameters.

NameTypeRequiredDescription
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://{projectId}-{containerId}-exec-1.{server}.containers.hoody.com/api/v1/exec/schedules/reload" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true
}'