---
title: "Create a new scheduled task"
method: POST
path: "/v1/scheduled-tasks"
tags: ["Scheduled Tasks"]
---

# Create a new scheduled task

`POST /v1/scheduled-tasks`

Create a recurrent (cron-based) or one-time scheduled task. Provide `schedule` for recurrent tasks or `executionTime` for one-time tasks.

## 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 `201`

Task created successfully

## Other responses

- `400` — Invalid request body or missing required fields
- `401` — Unauthorized
- `403` — Insufficient access rights (including missing access right required by the task handler)
- `404` — Referenced object 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)
