Set schedule
set_scheduleHave spawnpoint call a route on a node, python, or docker app on a timer, for work at intervals: a digest, polling an inbox, a nightly export. Use it instead of a timer inside the app (setInterval, node-cron, APScheduler), which stops while the app sleeps: put the job in a POST route, deploy, then call set_schedule. At each time, spawnpoint wakes the app if it sleeps and sends one POST to path; the app does the work and answers 2xx when it is done. cron is five fields in timezone (UTC by default): "0 2 * * " is every day at 02:00, "/15 * * * *" every 15 minutes, "0 9 * * 1-5" weekdays at 09:00. Each POST carries X-Spawnpoint-Signature: t=,v1=<hex HMAC-SHA256 of t + "." + the raw body, keyed with the SPAWNPOINT_RUN_SECRET env var>; the route must recompute it over the raw body (not re-serialized JSON), compare in constant time (crypto.timingSafeEqual, hmac.compare_digest), refuse a t more than 300 seconds from now, and answer 401 otherwise. The body is JSON with run_id, schedule, scheduled_for, and attempt: key the work by scheduled_for, and answer 200 at once for a run_id already done, since a failed run is retried. The first schedule restarts the app once to give it SPAWNPOINT_RUN_SECRET. Setting the same name again changes that schedule; remove_schedule removes one. Plans limit how many schedules a project has, how often they run, and timeout_seconds; a refusal says the limit. Then call run_schedule to try it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"path": "<path>",
"cron": "<cron>"
},
"name": "set_schedule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cron | Yes | when, as five cron fields (minute hour day-of-month month day-of-week), such as 0 2 * * * for every day at 02:00, or @hourly, @daily, @weekly | |
| name | No | a name for the schedule; defaults to the path. Setting a name again changes that schedule | |
| path | Yes | the app's route spawnpoint POSTs to, starting with /, such as /tasks/nightly-export | |
| paused | No | true keeps the schedule but stops its runs; setting it again without paused resumes it | |
| timezone | No | the IANA timezone the cron is read in, such as Europe/London; UTC when omitted | |
| project_id | Yes | the id of the project | |
| timeout_seconds | No | how long a run may take before it counts as failed; 60 when omitted, at most 60 on Free and 300 on paid plans |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| schedule | Yes | ||
| project_id | Yes | ||
| secret_env | Yes |