| author | hhunter-ms |
|---|---|
| ms.author | hannahhunter |
| title | Develop with Durable Task Scheduler |
| titleSuffix | Durable Task |
| description | Learn how to develop with the Durable Task Scheduler using the Azure CLI for both Durable Functions and Durable Task SDKs. |
| ms.topic | how-to |
| ms.service | durable-task |
| ms.subservice | durable-task-scheduler |
| ms.date | 11/05/2025 |
| zone_pivot_groups | dts-devexp |
The Durable Task Scheduler is a highly performant, fully managed backend provider for Durable Task with an out-of-the-box monitoring dashboard. Azure offers two developer-oriented orchestration frameworks that work with Durable Task Scheduler to build apps: Durable Task SDKs and Durable Functions.
In this article, you learn to:
[!div class="checklist"]
- Run the Durable Task Scheduler emulator
- Perform CRUD operations on a scheduler and task hub.
Learn more about Durable Task Scheduler features, supported regions, and plans.
The Durable Task Scheduler emulator is only available as a Docker image today.
-
Pull the docker image containing the emulator.
docker pull mcr.microsoft.com/dts/dts-emulator:latest
-
Run the emulator.
docker run -itP mcr.microsoft.com/dts/dts-emulator:latest
This command exposes a single task hub named
default. If you need more than one task hub, you can set the environment variableDTS_TASK_HUB_NAMESon the container to a comma-delimited list of task hub names like in the following command:docker run -itP -e DTS_TASK_HUB_NAMES=taskhub1,taskhub2,taskhub3 mcr.microsoft.com/dts/dts-emulator:latest
::: zone pivot="az-cli"
-
Log in to the Azure CLI and make sure you have the latest installed.
az login az upgrade -
Install the Durable Task Scheduler CLI extension.
az extension add --name durabletask -
If you already installed the Durable Task Scheduler CLI extension, upgrade to the latest version.
az extension update --name durabletask -
Check your installed version:
az extension show --name durabletask
Learn more about the various az durabletask commands you can use.
::: zone-end
::: zone pivot="az-cli"
-
Create a resource group.
az group create --name YOUR_RESOURCE_GROUP --location LOCATION -
Using the
durabletaskCLI extension, create a scheduler.az durabletask scheduler create --name "YOUR_SCHEDULER" --resource-group "YOUR_RESOURCE_GROUP" --location "LOCATION" --ip-allowlist "[0.0.0.0/0]" --sku-name "dedicated" --sku-capacity "1"The creation process may take up to 15 minutes to complete.
Output
{ "id": "/subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/YOUR_RESOURCE_GROUP/providers/Microsoft.DurableTask/schedulers/YOUR_SCHEDULER", "location": "northcentralus", "name": "YOUR_SCHEDULER", "properties": { "endpoint": "https://YOUR_SCHEDULER.northcentralus.durabletask.io", "ipAllowlist": [ "0.0.0.0/0" ], "provisioningState": "Succeeded", "sku": { "capacity": 1, "name": "Dedicated", "redundancyState": "None" } }, "resourceGroup": "YOUR_RESOURCE_GROUP", "systemData": { "createdAt": "2025-01-06T21:22:59Z", "createdBy": "[email protected]", "createdByType": "User", "lastModifiedAt": "2025-01-06T21:22:59Z", "lastModifiedBy": "[email protected]", "lastModifiedByType": "User" }, "tags": {} }az durabletask scheduler create --name "YOUR_SCHEDULER" --resource-group "YOUR_RESOURCE_GROUP" --location "LOCATION" --ip-allowlist "[0.0.0.0/0]" --sku-name "consumption"The creation process may take up to 15 minutes to complete.
Output
{ "id": "/subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/YOUR_RESOURCE_GROUP/providers/Microsoft.DurableTask/schedulers/YOUR_SCHEDULER", "location": "northcentralus", "name": "YOUR_SCHEDULER", "properties": { "endpoint": "https://YOUR_SCHEDULER.northcentralus.durabletask.io", "ipAllowlist": [ "0.0.0.0/0" ], "provisioningState": "Succeeded", "sku": { "name": "Consumption", "redundancyState": "None" } }, "resourceGroup": "YOUR_RESOURCE_GROUP", "systemData": { "createdAt": "2025-01-06T21:22:59Z", "createdBy": "[email protected]", "createdByType": "User", "lastModifiedAt": "2025-01-06T21:22:59Z", "lastModifiedBy": "[email protected]", "lastModifiedByType": "User" }, "tags": {} }
-
Create a task hub.
az durabletask taskhub create --resource-group YOUR_RESOURCE_GROUP --scheduler-name YOUR_SCHEDULER --name YOUR_TASKHUBOutput
{ "id": "/subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/YOUR_RESOURCE_GROUP/providers/Microsoft.DurableTask/schedulers/YOUR_SCHEDULERS/taskHubs/YOUR_TASKHUB", "name": "YOUR_TASKHUB", "properties": { "provisioningState": "Succeeded" }, "resourceGroup": "YOUR_RESOURCE_GROUP", "systemData": { "createdAt": "2024-09-18T22:13:56.5467094Z", "createdBy": "OBJECT_ID", "createdByType": "User", "lastModifiedAt": "2024-09-18T22:13:56.5467094Z", "lastModifiedBy": "OBJECT_ID", "lastModifiedByType": "User" }, "type": "microsoft.durabletask/scheduler/taskhubs" }
::: zone-end
::: zone pivot="az-portal"
-
In the Azure portal, search for Durable Task Scheduler and select it from the results.
:::image type="content" source="media/create-durable-task-scheduler/search-for-durable-task-scheduler.png" alt-text="Screenshot of searching for the Durable Task Scheduler in the portal.":::
-
Click Create to open the Durable Task Scheduler pane.
:::image type="content" source="media/create-durable-task-scheduler/top-level-create-form.png" alt-text="Screenshot of the create page for the Durable Task Scheduler.":::
-
Fill out the fields in the Basics tab. Click Review + create.
-
Once the validation passes, click Create.
Deployment may take around 15 to 20 minutes.
::: zone-end
::: zone pivot="az-cli"
-
Get a list of all scheduler names within a subscription by running the following command.
az durabletask scheduler list --subscription <SUBSCRIPTION_ID> -
You can narrow down results to a specific resource group by adding the
--resource-groupflag.az durabletask scheduler list --subscription <SUBSCRIPTION_ID> --resource-group <RESOURCE_GROUP_NAME>
::: zone-end
::: zone pivot="az-portal"
In the Azure portal, search for Durable Task Scheduler and select it from the results.
:::image type="content" source="media/create-durable-task-scheduler/search-for-durable-task-scheduler.png" alt-text="Screenshot of searching for the Durable Task Scheduler service in the portal.":::
You can see the list of scheduler resources created in all subscriptions you have access to.
::: zone-end
::: zone pivot="az-cli"
Retrieve a list of task hubs in a specific scheduler by running:
az durabletask taskhub list --resource-group <RESOURCE_GROUP_NAME> --scheduler-name <SCHEDULER_NAME>
::: zone-end
::: zone pivot="az-portal"
You can see all the task hubs created in a scheduler on the Overview of the resource on Azure portal.
:::image type="content" source="media/create-durable-task-scheduler/durable-task-scheduler-overview-portal.png" alt-text="Screenshot of overview tab of Durable Task Scheduler in the portal.":::
::: zone-end
::: zone pivot="az-cli"
-
Delete the scheduler:
az durabletask scheduler --resource-group YOUR_RESOURCE_GROUP --scheduler-name YOUR_SCHEDULER -
Delete a task hub:
az durabletask taskhub delete --resource-group YOUR_RESOURCE_GROUP --scheduler-name YOUR_SCHEDULER --name YOUR_TASKHUB
::: zone-end
::: zone pivot="az-portal"
-
Open the scheduler resource on Azure portal and click Delete:
:::image type="content" source="media/create-durable-task-scheduler/durable-task-scheduler-delete-portal.png" alt-text="Screenshot of scheduler resource in the portal highlighting delete button.":::
-
Find the scheduler with the task hub you want to delete, then click into that task hub. Click Delete:
:::image type="content" source="media/create-durable-task-scheduler/task-hub-delete-portal.png" alt-text="Screenshot of task hub resource in the portal highlighting delete button.":::
::: zone-end
Durable Task Scheduler only supports either user-assigned or system-assigned managed identity authentication. User-assigned identities are recommended, as they aren't tied to the lifecycle of the app and can be reused after the app is deprovisioned.
Learn more about identity-based access in Durable Task Scheduler.
Assign the required role to your developer identity (email) to gain access to the Durable Task Scheduler dashboard.
For using Durable Task Scheduler with Durable Functions:
For using Durable Task Scheduler with the Durable Task SDKs: