Create schedule
Add a new cron schedule to a script.
This endpoint requires the Pro plan or higher.
POST/api/scripts/{script}/schedules
Create a schedule
Creates a schedule that runs the script across the given servers every minute the cron expression matches.
Required attributes
- Name
cron_expression- Type
- string
- Description
Standard 5-field cron expression, e.g.
*/5 * * * *.
- Name
servers- Type
- array
- Description
Array of server IDs to run the script on. All servers must belong to your current team.
Request
POST
/api/scripts/{script}/schedulescurl -X POST "https://ploi.io/api/scripts/{script}/schedules" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"cron_expression": "*/5 * * * *",
"servers": [12, 18]
}'
Response
{
"data": {
"id": 1,
"script_id": 42,
"cron_expression": "*/5 * * * *",
"servers": [12, 18],
"is_paused": false,
"next_run_at": "2026-05-13T08:55:00+00:00",
"last_run_at": null,
"created_at": "2026-05-13 08:50:00",
"updated_at": "2026-05-13 08:50:00"
}
}