Update schedule
Replace the cron expression and server list of an existing schedule.
This endpoint requires the Pro plan or higher.
PATCH/api/scripts/{script}/schedules/{schedule}
Update a schedule
Both cron_expression and servers are required — this endpoint replaces
the values rather than merging them.
Required attributes
- Name
cron_expression- Type
- string
- Description
Standard 5-field cron expression.
- Name
servers- Type
- array
- Description
Array of server IDs the script should run on.
Request
PATCH
/api/scripts/{script}/schedules/{schedule}curl -X PATCH "https://ploi.io/api/scripts/{script}/schedules/{schedule}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"cron_expression": "0 3 * * *",
"servers": [12]
}'
Response
{
"data": {
"id": 1,
"script_id": 42,
"cron_expression": "0 3 * * *",
"servers": [12],
"is_paused": false,
"next_run_at": "2026-05-14T03:00:00+00:00",
"last_run_at": "2026-05-13T08:50:00+00:00",
"created_at": "2026-05-12 10:11:22",
"updated_at": "2026-05-13 08:55:00"
}
}