Cron API

Manage scheduled jobs via the API. See also schedules.md for agent-scoped schedule endpoints.

Endpoints

MethodPathDescription
GET/cron/jobsList all cron jobs
POST/cron/jobsCreate a cron job
DELETE/cron/jobs/{id}Delete a job
PUT/cron/jobs/{id}/enableToggle enabled state
POST/cron/jobs/{id}/runManually trigger a job

GET /cron/jobs

curl http://localhost:4200/cron/jobs

Response (200)

{
  "jobs": [
    {
      "id": "j-001",
      "agent_id": "550e8400-e29b-41d4-a716-446655440000",
      "expression": "0 */6 * * *",
      "prompt": "Process pending claims queue",
      "enabled": true,
      "last_run": "2026-06-04T06:00:00Z"
    }
  ]
}

POST /cron/jobs

curl -X POST http://localhost:4200/cron/jobs \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "550e8400-e29b-41d4-a716-446655440000",
    "expression": "0 8 * * 1",
    "prompt": "Generate weekly claims report"
  }'

Response (201)

{"id": "j-002"}

DELETE /cron/jobs/{id}

curl -X DELETE http://localhost:4200/cron/jobs/j-002

Response (204 No Content)


PUT /cron/jobs/{id}/enable

Toggle the enabled state.

curl -X PUT http://localhost:4200/cron/jobs/j-001/enable \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'

Response (200)

{"id": "j-001", "enabled": false}

POST /cron/jobs/{id}/run

Manually trigger a job immediately.

curl -X POST http://localhost:4200/cron/jobs/j-001/run

Response (200)

{"triggered": true}