You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-task-scheduler/develop-with-durable-task-scheduler-functions.md
+3-48Lines changed: 3 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,60 +17,13 @@ The Azure Functions Durable Task Scheduler is a highly performant, fully managed
17
17
Learn more about Durable Task Scheduler [features](./durable-task-scheduler.md#feature-highlights), [supported regions](./durable-task-scheduler.md#limitations-and-considerations), and [plans](./durable-task-scheduler.md#limitations-and-considerations).
18
18
19
19
## Create a scheduler and task hub
20
-
21
-
You can create a scheduler and task hub on Azure portal via two ways:
22
-
-**Function app integrated creation:***(recommended)* automatically creates the managed identity resource and RBAC assignment, plus configures required environment variables for your app to access Durable Task Scheduler.
23
-
-**Top-level creation:** Requires you to [manually assign RBAC permission](#configure-identity-based-authentication-for-app-to-access-durable-task-scheduler) to configure scheduler access for your app.
20
+
You can create a scheduler and a task hub as part of the Function app creation on Azure portal. This creation approach automatically configures identity-based authentication for the app to access the task hub.
24
21
25
22
> [!NOTE]
26
23
> Durable Task Scheduler currently supports apps hosted in the **App Service** and **Functions Premium** plans, so this experience is available only when either of these plan types is picked.
1. In the Azure portal, search for **Durable Task Scheduler** and select it from the results.
37
-
38
-
:::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.":::
39
-
40
-
1. Click **Create** to open the **Azure Functions: Durable Task Scheduler (preview)** pane.
41
-
42
-
:::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.":::
43
-
44
-
1. Fill out the fields in the **Basics** tab. Click **Review + create**. Once the validation passes, click **Create**.
45
-
46
-
Deployment may take around 15 to 20 minutes.
47
-
48
-
---
49
-
50
-
## View all Durable Task Scheduler resources in a subscription
51
-
52
-
In the Azure portal, search for **Durable Task Scheduler** and select it from the results.
53
-
54
-
:::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.":::
55
-
56
-
You can see the list of scheduler resources created in all subscriptions you have access to.
57
-
58
-
## View all task hubs in a Durable Task Scheduler
59
-
60
-
You can see all the task hubs created in a scheduler on the **Overview** of the resource on Azure portal.
61
-
62
-
:::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.":::
63
-
64
-
## Delete the scheduler and task hub
65
-
66
-
1. Open the scheduler resource on Azure portal and click **Delete**:
67
-
68
-
:::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.":::
69
-
70
-
1. Find the scheduler with the task hub you want to delete, then click into that task hub. Click **Delete**:
71
-
72
-
:::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.":::
73
-
74
27
## Configure identity-based authentication for app to access Durable Task Scheduler
75
28
76
29
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.
@@ -109,6 +62,8 @@ az resource update -g <resource_group> -n <function_app_name>/config/web --set p
109
62
110
63
Currently, migrating across providers isn't supported. Function apps that have existing runtime data need to start with a fresh, empty task hub after they switch to the Durable Task Scheduler. Similarly, the task hub contents that are created by using the scheduler resource can't be preserved if you switch to a different backend provider.
111
64
65
+
-**[Management operations using the Azure Functions Core Tools](../durable-functions-instance-management.md#azure-functions-core-tools)**
description: Learn how to develop with the Durable Task Scheduler using the Azure CLI for both Durable Functions and Durable Task Scheduler.
4
4
ms.topic: how-to
5
5
ms.date: 05/06/2025
6
+
zone_pivot_groups: dts-devexp
6
7
---
7
8
8
9
# Develop with Durable Task Scheduler (preview)
9
10
10
11
The Durable Task Scheduler is a highly performant, fully managed backend provider for Durable Functions with an [out-of-the-box monitoring dashboard](./durable-task-scheduler-dashboard.md). Azure offers two developer-oriented orchestration frameworks that work with Durable Functions to build apps: Durable Task SDKs and Durable Functions.
11
12
12
-
In this article, you use the Azure CLI and the Durable Task extension to:
13
+
In this article, you learn to:
13
14
14
15
> [!div class="checklist"]
15
-
> * Create a scheduler and task hub.
16
-
> * Configure identity-based authentication for your application to access Durable Task Scheduler.
17
-
> * Monitor the status of your app and task hub on the Durable Task Scheduler dashboard.
16
+
> * Run the Durable Task Scheduler emulator
17
+
> * Perform CRUD operations on a scheduler and task hub.
18
18
19
19
Learn more about Durable Task Scheduler [features](./durable-task-scheduler.md#feature-highlights), [supported regions](./durable-task-scheduler.md#limitations-and-considerations), and [plans](./durable-task-scheduler.md#limitations-and-considerations).
20
20
21
-
> [!NOTE]
22
-
> Durable Task Scheduler currently supports apps hosted in the **App Service** and **Functions Premium** plans only.
21
+
## Durable Task Scheduler emulator
22
+
23
+
The Durable Task Scheduler emulator is only available as a Docker image today.
docker run -itP mcr.microsoft.com/dts/dts-emulator:latest
35
+
```
36
+
37
+
This command exposes a single task hub named `default`. If you need more than one task hub, you can set the environment variable `DTS_TASK_HUB_NAMES` on the container to a comma-delimited list of task hub names like in the following command:
38
+
39
+
```bash
40
+
docker run -itP -e DTS_TASK_HUB_NAMES=taskhub1,taskhub2,taskhub3 mcr.microsoft.com/dts/dts-emulator:latest
41
+
```
42
+
43
+
::: zone pivot="az-cli"
23
44
24
45
## Prerequisites
25
46
@@ -45,29 +66,11 @@ Learn more about Durable Task Scheduler [features](./durable-task-scheduler.md#f
docker run -itP mcr.microsoft.com/dts/dts-emulator:latest
61
-
```
62
-
63
-
This command exposes a single task hub named `default`. If you need more than one task hub, you can set the environment variable `DTS_TASK_HUB_NAMES` on the container to a comma-delimited list of task hub names like in the following command:
64
-
65
-
```bash
66
-
docker run -itP -e DTS_TASK_HUB_NAMES=taskhub1,taskhub2,taskhub3 mcr.microsoft.com/dts/dts-emulator:latest
67
-
```
69
+
::: zone-end
68
70
69
71
## Create a scheduler and task hub
70
72
73
+
::: zone pivot="az-cli"
71
74
1. Create a resource group.
72
75
73
76
```azurecli
@@ -141,9 +144,28 @@ Learn more about Durable Task Scheduler [features](./durable-task-scheduler.md#f
1. In the Azure portal, search for**Durable Task Scheduler** and selectit from the results.
152
+
153
+
:::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.":::
154
+
155
+
1. Click **Create** to open the **Azure Functions: Durable Task Scheduler (preview)** pane.
156
+
157
+
:::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.":::
158
+
159
+
1. Fill out the fields in the **Basics** tab. Click **Review + create**. Once the validation passes, click **Create**.
160
+
161
+
Deployment may take around 15 to 20 minutes.
162
+
163
+
::: zone-end
144
164
145
165
## View all Durable Task Scheduler resources in a subscription
146
166
167
+
::: zone pivot="az-cli"
168
+
147
169
1. Get a list of all scheduler names within a subscription by running the following command.
148
170
149
171
```azurecli
@@ -155,17 +177,41 @@ Learn more about Durable Task Scheduler [features](./durable-task-scheduler.md#f
155
177
```azurecli
156
178
az durabletask scheduler list --subscription <SUBSCRIPTION_ID> --resource-group <RESOURCE_GROUP_NAME>
157
179
```
180
+
::: zone-end
181
+
182
+
::: zone pivot="az-portal"
183
+
184
+
In the Azure portal, search for**Durable Task Scheduler** and selectit from the results.
185
+
186
+
:::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.":::
187
+
188
+
You can see the list of scheduler resources created in all subscriptions you have access to.
189
+
190
+
::: zone-end
158
191
159
192
## View all task hubs in a Durable Task Scheduler
160
193
161
-
Retrieve a list of task hubs in a specific scheduler by running:
194
+
::: zone pivot="az-cli"
195
+
196
+
1. Retrieve a list of task hubs in a specific scheduler by running:
197
+
198
+
```azurecli
199
+
az durabletask taskhub list --resource-group <RESOURCE_GROUP_NAME> --scheduler-name <SCHEDULER_NAME>
200
+
```
201
+
::: zone-end
202
+
203
+
::: zone pivot="az-portal"
204
+
205
+
You can see all the task hubs created in a scheduler on the **Overview** of the resource on Azure portal.
206
+
207
+
:::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.":::
162
208
163
-
```azurecli
164
-
az durabletask taskhub list --resource-group <RESOURCE_GROUP_NAME> --scheduler-name <SCHEDULER_NAME>
165
-
```
209
+
::: zone-end
166
210
167
211
## Delete the scheduler and task hub
168
212
213
+
::: zone pivot="az-cli"
214
+
169
215
1. Delete the scheduler:
170
216
171
217
```azurecli
@@ -177,22 +223,36 @@ az durabletask taskhub list --resource-group <RESOURCE_GROUP_NAME> --scheduler-n
177
223
```azurecli
178
224
az durabletask taskhub delete --resource-group YOUR_RESOURCE_GROUP --scheduler-name YOUR_SCHEDULER --name YOUR_TASKHUB
179
225
```
226
+
::: zone-end
227
+
228
+
::: zone pivot="az-portal"
229
+
230
+
1. Open the scheduler resource on Azure portal and click **Delete**:
231
+
232
+
:::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.":::
233
+
234
+
1. Find the scheduler with the task hub you want to delete, then click into that task hub. Click **Delete**:
235
+
236
+
:::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.":::
237
+
238
+
::: zone-end
239
+
180
240
181
241
## Configure identity-based authentication for app to access Durable Task Scheduler
182
242
183
243
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.
184
244
185
-
If you haven't already, [configure managed identityfor your Durable Functions app](./durable-task-scheduler-identity.md).
245
+
Learn more about [identity-based access in Durable Task Scheduler](./durable-task-scheduler-identity.md).
186
246
187
247
## Access the Durable Task Scheduler dashboard
188
248
189
-
[Assign the required role to your *developer identity (email)*](./durable-task-scheduler-dashboard.md#access-the-durable-task-scheduler-dashboard) to gain access to the Durable Task Scheduler dashboard.
249
+
[Assign the required role to your *developer identity (email)*](./durable-task-scheduler-dashboard.md) to gain access to the Durable Task Scheduler dashboard.
190
250
191
251
## Next steps
192
252
193
-
For Durable Task Scheduler for Durable Functions:
253
+
For using Durable Task Scheduler with Durable Functions:
194
254
- [Quickstart: Configure a Durable Functions app to use Azure Functions Durable Task Scheduler](./quickstart-durable-task-scheduler.md)
195
255
196
-
For Durable Task Scheduler for the Durable Task SDKs:
256
+
For using Durable Task Scheduler with the Durable Task SDKs:
197
257
- [Quickstart: Create an app with Durable Task SDKs and Durable Task Scheduler](./quickstart-portable-durable-task-sdks.md)
198
258
- [Quickstart: Host a Durable Task SDK app on Azure Container Apps](./quickstart-container-apps-durable-task-sdk.md)
Large volumes of completed orchestration instance data can lead to storage bloat, incur higher storage costs, and degrade performance. The autopurge feature for Durable Task Scheduler provides a streamlined, configurable solution to manage orchestration instance clean-up automatically. [Learn more about setting autopurge retention policies for Durable Task Scheduler.](./durable-task-scheduler-auto-purge.md)
123
+
Stale orchestration data should be purged periodically to ensure efficient storage usage. The autopurge feature for Durable Task Scheduler provides a streamlined, configurable solution to manage orchestration instance clean-up automatically. [Learn more about setting autopurge retention policies for Durable Task Scheduler.](./durable-task-scheduler-auto-purge.md)
124
124
125
125
## Limitations and considerations
126
126
@@ -156,10 +156,9 @@ Large volumes of completed orchestration instance data can lead to storage bloat
- [Management operations using the Azure Functions Core Tools](../durable-functions-instance-management.md#azure-functions-core-tools)
160
159
161
160
> [!NOTE]
162
-
> Feature availability is subject to change as the Durable Task Scheduler backend approaches general availability. To report problems or request new features, submit an issue in the [Durable Task Scheduler samples GitHub repository](https://github.com/Azure-Samples/Durable-Task-Scheduler/).
161
+
> Feature availability is subject to change as the Durable Task Scheduler backend approaches general availability. To report problems or request new features, submit an issue in the [Durable Task Scheduler GitHub repository](https://github.com/azure/Durable-Task-Scheduler).
0 commit comments