Update Schedule

Scheduler prerequisites

Configure an AgentOS-level database with schedule methods. The example scheduler server uses SQLite. Database-backed schedule CRUD is available without starting the scheduler; execution requires scheduler=True, a running application lifespan and a scheduler_base_url matching the server's address.

Owners come from authenticated identity. Configured authorization uses schedules:read, schedules:write and schedules:delete. Creating, repointing, enabling or triggering a run schedule also requires permission to run its target. Non-run targets require admin permission when that authorization is enforced. An inaccessible record can return 404; insufficient permission returns 403.

Partial updates and nulls

Send only changed fields; {} leaves the schedule unchanged. description and payload can be cleared with null. Explicit null for name, cron_expr, endpoint, method, timezone, timeout_seconds, max_retries or retry_delay_seconds returns 422, despite their nullable generated schema.

Changing the target rechecks its availability and run permission. The new endpoint must remain a valid local path.

PATCH/schedules/{schedule_id}

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

schedule_id*Schedule Id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl --request PATCH 'https://example.com/schedules/string' \  --header 'Content-Type: application/json' \  --data-raw '{}'
{  "id": "string",  "user_id": "string",  "name": "string",  "description": "string",  "method": "string",  "endpoint": "string",  "payload": {},  "cron_expr": "string",  "timezone": "string",  "timeout_seconds": 0,  "max_retries": 0,  "retry_delay_seconds": 0,  "enabled": true,  "next_run_at": 0,  "managed_by": "string",  "target_type": "string",  "target_id": "string",  "disabled_reason": "string",  "created_at": 0,  "updated_at": 0}