API referenceSections

Change a scheduled task

Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication

PUT /api/v1/tenants/{tid}/sites/{id}/cron/{task}

Change a scheduled task

Authentication: session cookie __Host-panel_session (contract default; see Authentication).

Parameters

NameInTypeRequiredDescription
tidpathstringrequired
idpathstringrequired
taskpathstringrequired
X-CSRF-Tokenheaderstringoptional

Required on unsafe requests authenticated by session cookie; API keys do not use it.

Request body

required

Content type: application/json

  • name string required
  • schedule string required

    Five-field cron: minute hour day month weekday, or @daily etc.

  • kind string required
    Allowed values: "command" "url"
  • program string optional
    Allowed values: "php" "node" "python" "file"
  • version string optional

    Node or Python version for those programs

  • path string optional

    Script or file, relative to the website's folder

  • args array<string> optional
  • url string optional
  • timeout_seconds integer optional
  • enabled boolean optional
Example
{
  "name": "string",
  "schedule": "string",
  "kind": "command",
  "program": "php",
  "version": "string",
  "path": "string",
  "args": [
    "string"
  ],
  "url": "string",
  "timeout_seconds": 0,
  "enabled": true
}

Responses

200 Task

Content type: application/json

  • name string required
  • schedule string required

    Five-field cron: minute hour day month weekday, or @daily etc.

  • kind string required
    Allowed values: "command" "url"
  • program string optional
    Allowed values: "php" "node" "python" "file"
  • version string optional

    Node or Python version for those programs

  • path string optional

    Script or file, relative to the website's folder

  • args array<string> optional
  • url string optional
  • timeout_seconds integer optional
  • enabled boolean optional
  • id string required
  • site_id string required
  • created_at string (date-time) required
  • updated_at string (date-time) required
Example
{
  "name": "string",
  "schedule": "string",
  "kind": "command",
  "program": "php",
  "version": "string",
  "path": "string",
  "args": [
    "string"
  ],
  "url": "string",
  "timeout_seconds": 0,
  "enabled": true,
  "id": "string",
  "site_id": "string",
  "created_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:00:00Z"
}

default Error

Content type: application/json

  • code string required
  • message string required
  • details_redacted boolean required
  • correlation_id string required
  • retryable boolean required