hosting

PATCH /v1/sites/{siteId}/scheduled-tasks/{taskId}

Change some fields of a site's scheduled task.

All hosting endpoints

All developer docs →

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

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).
taskId (path)stringYesThe 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

NameTypeRequiredWhat it is
namestringNo—
kindstring<command, php, url, wpcron>No—
targetstringNoThe command (one line), the .php path inside the site folder, or the address.
commandstringNoThe old field — the same as target for a command task.
schedulestringNoFive fields minute hour day-of-month month day-of-week, UTC, or @hourly, @daily, @weekly, @monthly, @yearly. At most once every 5 minutes.
email_outputstringNoAn address to mail each scheduled run's output to, or empty for none.
enabledbooleanNoSwitch the task on (default) or off.

Response

NameTypeRequiredWhat it is
idstringYesA UUID for a managed task; a 16-character id for a crontab line.
namestringYesThe name the customer gave it (empty for a crontab line).
kindstring<command, php, url, wpcron>Yescommand 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.
targetstringYesThe command, the script path or the address (empty for wpcron).
schedulestringYesFive 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.
commandstringYesThe command line for a command task (the old field); empty otherwise.
enabledbooleanYesWhether the customer has it switched on.
email_outputstringYesWhere each scheduled run's output is mailed, or "".
paused_reasonstringYesstaff when our team switched it off; "" otherwise.
sourcestring<panel, crontab>Yes—
site_idstringYes—
site_domainstringYesFilled on the account-wide list.

Errors this endpoint can return

401 · 403 · 404 · 422 · 429 · 503