hosting
PATCH /v1/sites/{siteId}/scheduled-tasks/{taskId}
Change some fields of a site's scheduled task.
Authentication
Send an API key as a bearer token. The endpoint checks sites.panel_access, sites.view; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X PATCH https://api.zinndigital.com/v1/sites/{siteId}/scheduled-tasks/{taskId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
The same as updateSiteScheduledTask; provided for clients that send PATCH.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
siteId (path) | Uuid | Yes | Site ID (UUIDv7). |
taskId (path) | string | Yes | The task's id from listSiteScheduledTasks: a UUID for a task managed here, or a 16-character id for a line added to the crontab over SSH. |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
name | string | No | — |
kind | string<command, php, url, wpcron> | No | — |
target | string | No | The command (one line), the .php path inside the site folder, or the address. |
command | string | No | The old field — the same as target for a command task. |
schedule | string | No | Five fields minute hour day-of-month month day-of-week, UTC, or @hourly, @daily, @weekly, @monthly, @yearly. At most once every 5 minutes. |
email_output | string | No | An address to mail each scheduled run's output to, or empty for none. |
enabled | boolean | No | Switch the task on (default) or off. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | string | Yes | A UUID for a managed task; a 16-character id for a crontab line. |
name | string | Yes | The name the customer gave it (empty for a crontab line). |
kind | string<command, php, url, wpcron> | Yes | command a shell command; php a .php file in the site folder run with the site's PHP version; url open an http(s) address; wpcron WordPress's due events. |
target | string | Yes | The command, the script path or the address (empty for wpcron). |
schedule | string | Yes | Five fields, UTC, as written to the crontab. A */N minute field is moved to a fixed offset inside its window, so this can differ from what was sent. |
command | string | Yes | The command line for a command task (the old field); empty otherwise. |
enabled | boolean | Yes | Whether the customer has it switched on. |
email_output | string | Yes | Where each scheduled run's output is mailed, or "". |
paused_reason | string | Yes | staff when our team switched it off; "" otherwise. |
source | string<panel, crontab> | Yes | — |
site_id | string | Yes | — |
site_domain | string | Yes | Filled on the account-wide list. |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429 · 503