---
title: "List scheduled tasks"
method: GET
path: "/api/scheduled-tasks"
tags: ["Scheduled Tasks"]
---

# List scheduled tasks

`GET /api/scheduled-tasks`

Returns all scheduled tasks. Requires admin role.

## Response `200`

Array of scheduled task objects.

- ScheduledTask[]
  - `id` integer, required
  - `name` string, required
  - `target_type` 'stack' | 'fleet' | 'system' | 'container', required
  - `target_id` string, nullable — Stack or container name (when target_type is `stack` or `container`).
  - `node_id` integer, nullable — Target node ID (when target_type is `stack` or `container`).
  - `action` 'restart' | 'snapshot' | 'prune', required
  - `cron_expression` string, required — Standard cron expression (5 fields).
  - `enabled` 0 | 1, required
  - `created_by` string, required
  - `created_at` integer, required — Unix timestamp (seconds).
  - `updated_at` integer, required — Unix timestamp (seconds).
  - `last_run_at` integer, nullable
  - `next_run_at` integer, nullable
  - `last_status` string, nullable
  - `last_error` string, nullable
  - `prune_targets` string, nullable — JSON-stringified array of prune targets (containers, images, networks, volumes).
  - `target_services` string, nullable — JSON-stringified array of service names to restart.
  - `prune_label_filter` string, nullable — Docker label filter for prune operations.

## Other responses

- `403` — Insufficient permissions or license tier.
- `500` — Internal server error.

---

[API](https://skmtc.net/studio-saelix/apis/sencho-api.md) · [All operations](https://skmtc.net/studio-saelix/apis/sencho-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/studio-saelix/sencho-api/versions/f36f82acae1d/schema)
