Appearance
Schedules API
FreshSource: BIBLE.md (Phase 5 Scheduling, Phase 12 Autopilot)
Routes
| Method | Route | Body |
|---|---|---|
| POST | /schedules | full schedule object |
| GET | /schedules | - |
| GET | /schedules/:id | - |
| DELETE | /schedules/:id | - |
| POST | /schedules/:id/pause | - |
| POST | /schedules/:id/resume | - |
| POST | /schedules/autopilot | engages 3 default daemons |
| DELETE | /schedules/autopilot | disengages all 3 |
Create schedule
bash
curl -X POST http://localhost:4700/schedules \
-H "Content-Type: application/json" \
-H "x-api-key: ghost-engine-key" \
-d '{
"jobType": "ctr",
"campaignId": "dallas-junk-removal",
"runsPerDay": 50,
"startHour": 8,
"endHour": 22,
"spreadStrategy": "natural",
"daysOfWeek": [1,2,3,4,5],
"timezone": "America/Chicago"
}'Fields
| Field | Values | Default |
|---|---|---|
jobType | ctr, warmup, rank-check, cascade, cookie-refresh, phase-run | required |
campaignId | string | optional |
runsPerDay | number | 50 |
startHour | 0-23 | 8 |
endHour | 0-23 | 22 |
spreadStrategy | natural/even/burst | natural |
daysOfWeek | array of 0-6 | [1,2,3,4,5] |
timezone | tz string | America/Chicago |
jobConfig | object | {} |
Autopilot
bash
# Engage
curl -X POST http://localhost:4700/schedules/autopilot \
-H "x-api-key: ghost-engine-key"
# Disengage
curl -X DELETE http://localhost:4700/schedules/autopilot \
-H "x-api-key: ghost-engine-key"Creates 3 schedules: warmup, cookie-refresh, phase-run.
Pause / Resume
bash
curl -X POST http://localhost:4700/schedules/sched-abc/pause -H "x-api-key: ghost-engine-key"
curl -X POST http://localhost:4700/schedules/sched-abc/resume -H "x-api-key: ghost-engine-key"