v34

latestOpenAPI 3.1.0AGPL-3.0-onlyraw.githubusercontent.com2026-08-018932140.9 KB
Scheduled Tasks

Update scheduled task

Updates task configuration. Same validation rules as creation apply. Requires admin role.

put/api/scheduled-tasks/{id}

Path parameters

idinteger required

Numeric resource ID.

Request body

namestring
target_type'stack' | 'fleet' | 'system' | 'container'
target_idstring

Stack or container name when target_type is stack or container.

node_idinteger
action'restart' | 'snapshot' | 'prune'
cron_expressionstring
enabledboolean
prune_targetsstring[]
target_servicesstring[]
prune_label_filterstring

Response

Task updated.

idinteger required
namestring required
target_type'stack' | 'fleet' | 'system' | 'container' required
target_idstring nullable

Stack or container name (when target_type is stack or container).

node_idinteger nullable

Target node ID (when target_type is stack or container).

action'restart' | 'snapshot' | 'prune' required
cron_expressionstring required

Standard cron expression (5 fields).

enabled0 | 1 required
created_bystring required
created_atinteger required

Unix timestamp (seconds).

updated_atinteger required

Unix timestamp (seconds).

last_run_atinteger nullable
next_run_atinteger nullable
last_statusstring nullable
last_errorstring nullable
prune_targetsstring nullable

JSON-stringified array of prune targets (containers, images, networks, volumes).

target_servicesstring nullable

JSON-stringified array of service names to restart.

prune_label_filterstring nullable

Docker label filter for prune operations.

Example response

{
  "cron_expression": "0 3 * * *"
}