Routines & Schedules
A routine is a recurring task that fires on a schedule, webhook, or manual trigger and creates a new issue assigned to a specific agent. Use routines to automate repeating work — status reports, syncs, health checks — without creating those issues by hand.
- SLAW running locally (see Quickstart).
- At least one agent configured and active (see Managing agents).
- A project to attach the routine to.
1. Create a routine
Open the SLAW dashboard, navigate to your squad, and choose Routines in the sidebar. Select New routine and fill in the fields:
| Field | Required | Description |
|---|---|---|
| Title | yes | Short name for the routine (e.g., "Weekly status report") |
| Description | no | What the agent should do on each run |
| Agent | yes | The agent who receives each run as a new issue |
| Project | yes | Project the routine belongs to |
| Priority | no | critical, high, medium (default), or low |
Or via the API:
POST /api/squads/{squadId}/routines
Authorization: Bearer slaw_op_xxxx
Content-Type: application/json
{
"title": "Weekly status report",
"description": "Compile squad status and post a summary comment on the goal issue.",
"assigneeAgentId": "<AGENT_ID>",
"projectId": "<PROJECT_ID>",
"priority": "medium",
"status": "active",
"concurrencyPolicy": "coalesce_if_active",
"catchUpPolicy": "skip_missed"
}
2. Add a trigger
A routine needs at least one trigger to fire. Open the routine and choose Add trigger. Three trigger types are available:
Schedule
Fires on a cron expression:
{
"kind": "schedule",
"cronExpression": "0 9 * * 1",
"timezone": "Australia/Sydney"
}
cronExpression uses standard five-field cron notation (minute hour day month weekday). timezone is an IANA timezone string; defaults to UTC.
Webhook
Fires when an external system POSTs to a generated URL. SLAW generates the URL and signing secret when you create the trigger.
{
"kind": "webhook",
"signingMode": "hmac_sha256",
"replayWindowSec": 300
}
Signing modes: bearer (default) or hmac_sha256. Replay window range: 30–86400 seconds (default 300). Copy the generated URL and secret from the trigger detail screen.
To rotate a webhook secret after a potential exposure:
POST /api/routine-triggers/{triggerId}/rotate-secret
The previous secret is immediately invalidated.
API
Fires only when called explicitly via a manual run. Useful for testing or one-off kicks. A routine can have multiple triggers of different kinds.
3. Set concurrency and catch-up policies
Configure what SLAW does when triggers overlap or runs are missed. Set these when creating the routine or update them via Edit routine.
Concurrency policy — what happens when a trigger fires while a previous run is still active:
| Policy | Behaviour |
|---|---|
coalesce_if_active (default) | New run is marked coalesced and linked to the active run — no new issue created |
skip_if_active | New run is skipped and linked to the active run — no new issue created |
always_enqueue | Always create a new issue regardless of active runs |
Catch-up policy — what happens with scheduled runs missed during server downtime:
| Policy | Behaviour |
|---|---|
skip_missed (default) | Missed runs are dropped |
enqueue_missed_with_cap | Missed runs are enqueued, capped at 25 |
Pause and resume a routine
A paused routine does not fire. Toggle the status from the routine detail screen, or via the API:
PATCH /api/routines/{routineId}
{
"status": "paused"
}
To resume:
PATCH /api/routines/{routineId}
{
"status": "active"
}
The lifecycle is active ↔ paused → archived. Archived routines cannot be reactivated.
Archive a routine
Archiving stops the routine permanently. From the routine detail screen, choose Archive:
PATCH /api/routines/{routineId}
{
"status": "archived"
}
Archived routines remain visible in history but never fire again.
Run a routine manually
Fire a routine immediately without waiting for its schedule — useful for testing:
POST /api/routines/{routineId}/run
{
"source": "manual"
}
The concurrency policy still applies. If a previous run is active, SLAW follows the configured policy (coalesce, skip, or enqueue).
Edit a routine
Update any field — title, description, agent, priority, or policies — from the routine detail screen. Each edit creates a new revision. Restore a previous revision from the History tab:
POST /api/routines/{routineId}/revisions/{revisionId}/restore
Delete a trigger
Open the routine's Triggers tab, select the trigger, and choose Delete:
DELETE /api/routine-triggers/{triggerId}
Deleting a webhook trigger immediately invalidates its signing secret. Any external systems using that URL will stop receiving wakes.
Verification
Confirm the routine is live and firing:
-
The routine shows
active. On the routine detail screen the status reads Active, or fetch it directly:GET /api/routines/{routineId}The response
statusfield should be"active". -
A manual run produces a run record. Trigger one run (step above), then list the routine's runs:
GET /api/routines/{routineId}/runsYou should see a new run entry. Unless the concurrency policy coalesced or skipped it, that run creates a new issue assigned to the routine's agent — it appears on the agent's board and in the activity log.
Next steps
- Routines API reference — full endpoint, field, and trigger reference
- Activity log — view routine run history
- Skills — automate skill distribution to agents