> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/api-reference/scheduler/tasks/save-scheduler-task.md).

# Save Scheduler Task

Save scheduled task.

A **scheduled task** sends an Email, SMS or Push campaign on a cron schedule (UTC), as a user you choose.

This endpoint creates a task (no `taskId`) or updates one (with `taskId`) and returns its id (`tsk_…`). Creating needs `scheduler:create`, updating `scheduler:update`.

{% hint style="warning" %}
**Campaign tasks: `EmailCampaign`, `PushCampaign`, `SmsCampaign`.** On save, `task.type` names the channel and `campaign` is the same body that channel's create-campaign endpoint takes, without a time: `EmailCampaign` and `PushCampaign` take the nested campaign (`source`, `templateId`, `integrationId`, and the recipients for that source); `SmsCampaign` takes the flat SMS body (`deliveryType`, `templateId`, `integrationId` and the matching audience block, e.g. `phoneNumbers`) — its `projectId` is ignored, the task's project is used. Push and SMS since 2026-10-05. `CodeFunctionalCall` and `WebhookCall` are refused with `CM-ERRORS-SCHEDULER-008`, a missing or unknown `type` with `CM-ERRORS-SCHEDULER-007`. The cron has exactly 5 fields and runs in UTC. `initiatorUserId` must be you or a service user of the project (`CM-ERRORS-SCHEDULER-010` otherwise). There is no run-history endpoint yet.
{% endhint %}

{% openapi src="/files/0gOkqzp7kyziG9XPpCBy" path="/{version}/scheduler/tasks" method="post" %}
[norbix-hub-swagger.json](https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-7c7445e68689b62620e59cb01a3523deb46b865b%2Fnorbix-hub-swagger.json?alt=media)
{% endopenapi %}

## In Cloud

Manage this visually in Cloud — see [Tasks](/codemash/cloud/tasks/tasks.md).

## Use it from code

Every Norbix SDK exposes this endpoint as a method — see [Save Scheduler Task](/codemash/sdks/scheduler/tasks/save-scheduler-task.md) in the SDK reference, with examples in every language.
