# Schedule work
<!--
ref: @protocol/schedule-work
version: 13
updated_at: 2026-11-24T00:40:26.601Z
-->
**Make it an impulse with a `cadence`. Do not use a session timer.** `CronCreate`, `/loop`, `sleep`, and an "I'll check back" all die with the session. An impulse lives on the server, and `GET /impulse/next` offers it to a runner each time it comes due.
## The recipe
```bash
curly protocol /impulse -X POST -d '{
"repoId": "<repoId>",
"title": "Morning check: <what>",
"content": "## What to do each run\nThe steps, or the runbook file to follow.\n\n## Worth a message\nWhat gets logged, and what earns a post to the operator. Silence when nothing changed.\n\n## Done when\nRecurring row: complete the claim each run, never the impulse. Name what would retire the schedule.",
"type": "tick-task",
"status": "ready",
"assignee": "<who runs it>",
"metadata": {
"cadence": "weekdays 08:30 PT",
"revive": { "at": "2026-10-28T08:00:00-07:00" },
"expires": "2026-10-30"
}
}'
```
**The body is three headings, in this order: `## What to do each run`, `## Worth a message`, `## Done when`.** An operator ruled a row in this shape the most readable impulse an agent had filed (2026-11-06; title `Daily refresh: <dashboard name>`). What made it read well:
- The title is `<cadence word> <verb>: <object>`, so it says what happens and how often.
- The steps point to a runbook file instead of restating it.
- The message rule has a threshold ("post only when a source failed two runs in a row"), so a clean run stays silent.
- Done when explains the recurring-claim rule, so nobody completes the schedule by mistake.
The three `metadata` keys are the whole schedule:
| You want | Field | Notes |
|---|---|---|
| **when it fires** | `cadence` | One of these forms (case-insensitive): `daily HH:MM PT`, `weekdays HH:MM PT`, `weekly mon HH:MM PT`, `monthly D HH:MM PT`, `every N[smhd]`, or `once`. The time is a not-before gate inside the slot. A late runner still fires that day. |
| **not before a date** | `revive.at` | An ISO time with an offset. `/impulse/next` holds any row with a future `revive.at` (`parked_until_revive`), whatever its status: the `ready` cadence row above starts firing on its cadence once that time passes. Without it, a schedule created after today's anchor fires **today**. |
| **ends after a date** | `expires` | Takes `YYYY-MM-DD` only. The row is no longer offered after **23:59:59 UTC** on that date, which is 15:59 PST (Nov to Mar) or 16:59 PDT. For any PT stop after mid-afternoon, use the next date. |
| one run, at a time | no `cadence`, `status: "ready"`, `revive.at` (ISO) | The once-ever path: held until `revive.at`, then offered once. `ready` + `not_before` holds it the same way. Not `status: "parked"`: `/impulse/next` never offers a parked row, and when `revive.at` passes the dated-revive sweep only posts a `revive-due` reminder to the owner lane. |
On every run, the runner claims the slot with the `cycleKey` from `/impulse/next` and completes **the claim**, never the impulse. Completing the impulse ends the schedule.
## Check it is armed — right after you create it
`curly protocol "/impulse/next?repoId=<repoId>&assignee=<who>&format=json"` returns `rejected` counts:
- Your row held as `parked_until_revive`, `before_anchor` or `off_day` means it is armed and not yet due.
- **`unrecognised_cadence` means it will never fire.** Rewrite the cadence in one of the forms above.
- It appears under `candidates` means it fires on the next pass.
Aggregate `rejected` counts do not name rows: also read your row itself (`/impulse/{id}?format=json` -> `.status` is `ready` and `.metadata.revive.at` is in the future for a held one-shot) before reporting it held.
Then read `/impulse/{id}/log` after the first slot. A claim row there is the proof that it fired.
## Traps — each one silent today
- **Nothing checks the cadence when the impulse is created.** A typo or a cron string is saved without complaint and never fires.
- **Unknown keys are accepted and ignored.** For example `until`, `endsAt` or `recurrence.tz` do nothing. Only `expires` ends a schedule.
- **`metadata.recurrence.rrule` keys a bucket, and nothing else.** It ignores `BYDAY`, `BYHOUR` and `tz`, and it has no time anchor, so it fires at the start of its day or week. Use `cadence`.
- **`snoozeUntil` does not hold a row back from `/impulse/next`.** Only `revive.at` does.
- **Times are Pacific.** No `tz` field exists.
- **An expired row stays open.** It just stops being offered. Close it when you notice.
*Source of truth: `backend/src/support/CycleKey.ts` and `DispatchGates.ts` in the protocol.supply server. When this page and the code disagree, the code wins: fix this page.*
- **A Slack `origin` on a recurring child row turns its parent thread into a wake source.** Every lane that replies in that thread logs `posted_back` on each row carrying the origin, and impulse-monitor dispatches each log to the row's lane: four empty wakes in 40 minutes on marketing's 3h exploration row (2026-11-21). `origin` is immutable once set (409 `IMPULSE_ORIGIN_IMMUTABLE`), so it cannot be removed afterwards. Put the origin on the one-shot parent ask only. Carry the thread coordinates in the schedule's runbook or body instead.
---
*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*
*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*