---
title: "Update a scheduled task"
method: PUT
path: "/v1/scheduled-tasks/{task-id}"
tags: ["Scheduled Tasks"]
---

# Update a scheduled task

`PUT /v1/scheduled-tasks/{task-id}`

Update an existing scheduled task. Provide `schedule` for recurrent tasks or `executionTime` for one-time tasks.

## Path parameters

- `task-id` integer, required

## Request body

- ScheduledTaskCreateUpdate
  - `taskHandlerId` string, required — Task handler identifier
  - `schedule` string — Cron-style schedule expression (for recurrent tasks)
  - `executionTime` union — Execution time for one-time tasks. Accepts Unix timestamp (integer) or ISO 8601 string.
    - integer
    - string, date-time
  - `parameters` string — Task-specific persistent data
  - `objectId` integer — Associated NetXMS object ID
  - `comments` string — Task comments
  - `taskKey` string — Optional task key for identification
  - `disabled` boolean — Whether the task should be disabled

## Response `200`

Task updated successfully

- ScheduledTask
  - `id` integer — Unique task identifier
  - `taskHandlerId` string — Task handler identifier
  - `schedule` string — Cron-style schedule expression (for recurrent tasks)
  - `parameters` string — Task-specific persistent data
  - `scheduledExecutionTime` string, date-time, nullable — Scheduled execution time in ISO 8601 format, or null if not set
  - `lastExecutionTime` string, date-time, nullable — Last execution time in ISO 8601 format, or null if never executed
  - `recurrent` boolean — Whether this is a recurrent (cron-based) task
  - `disabled` boolean — Whether the task is disabled
  - `completed` boolean — Whether the task has completed
  - `running` boolean — Whether the task is currently running
  - `system` boolean — Whether this is a system task
  - `userId` integer — Owner user ID
  - `objectId` integer — Associated NetXMS object ID
  - `comments` string — Task comments
  - `taskKey` string — Optional task key for identification

## Other responses

- `400` — Invalid request body or missing required fields
- `401` — Unauthorized
- `403` — Insufficient access rights
- `404` — Task not found
- `500` — Database failure

---

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