---
title: "Update Task"
method: PATCH
path: "/services/{uuid}/scheduled-tasks/{task_uuid}"
tags: ["Scheduled Tasks"]
---

# Update Task

`PATCH /services/{uuid}/scheduled-tasks/{task_uuid}`

Update a scheduled task for a service.

## Path parameters

- `uuid` string, required
- `task_uuid` string, required

## Request body

- object
  - `name` string — The name of the scheduled task.
  - `command` string — The command to execute.
  - `frequency` string — The frequency of the scheduled task.
  - `container` string, nullable — The container where the command should be executed.
  - `timeout` integer — The timeout of the scheduled task in seconds.
  - `enabled` boolean — The flag to indicate if the scheduled task is enabled.

## Response `200`

Scheduled task updated.

- ScheduledTask — Scheduled Task model
  - `id` integer — The unique identifier of the scheduled task in the database.
  - `uuid` string — The unique identifier of the scheduled task.
  - `enabled` boolean — The flag to indicate if the scheduled task is enabled.
  - `name` string — The name of the scheduled task.
  - `command` string — The command to execute.
  - `frequency` string — The frequency of the scheduled task.
  - `container` string, nullable — The container where the command should be executed.
  - `timeout` integer — The timeout of the scheduled task in seconds.
  - `created_at` string, date-time — The date and time when the scheduled task was created.
  - `updated_at` string, date-time — The date and time when the scheduled task was last updated.

## Other responses

- `401` — Unauthenticated.
- `404` — Resource not found.
- `422` — Validation error.

---

[API](https://skmtc.net/coollabsio/apis/coolify.md) · [All operations](https://skmtc.net/coollabsio/apis/coolify/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coollabsio/coolify/versions/08be5dc8e729/schema)
