Skip to content

Commit 5ba84b7

Browse files
author
Jill Grant
authored
Merge pull request #277920 from ecfan/scheduling
Note about advanced scheduling options work only for built-in recurring triggers
2 parents 9c58d1d + 2aa3ef2 commit 5ba84b7

File tree

3 files changed

+104
-67
lines changed

3 files changed

+104
-67
lines changed

articles/connectors/connectors-native-recurrence.md

Lines changed: 61 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ ms.suite: integration
66
ms.reviewer: estfan, azla
77
ms.topic: how-to
88
ms.custom: engagement-fy23
9-
ms.date: 01/10/2024
9+
ms.date: 06/11/2024
1010
---
1111

1212
# Schedule and run recurring workflows with the Recurrence trigger in Azure Logic Apps
1313

1414
[!INCLUDE [logic-apps-sku-consumption-standard](~/reusable-content/ce-skilling/azure/includes/logic-apps-sku-consumption-standard.md)]
1515

16-
To start and run your workflow on a schedule, you can use the generic Recurrence trigger as the first step. You can set a date, time, and time zone for starting the workflow and a recurrence for repeating that workflow. The following list includes some patterns that this trigger supports along with more advanced recurrences and complex schedules:
16+
To start and run your workflow on a schedule, you can use the generic **Recurrence** trigger as the first step. You can set a date, time, and time zone for starting the workflow and a recurrence for repeating that workflow. The following list includes some patterns that this trigger supports along with more advanced recurrences and complex schedules:
1717

1818
* Run at a specific date and time, then repeat every *n* number of seconds, minutes, hours, days, weeks, or months.
1919

@@ -27,14 +27,15 @@ To start and run your workflow on a schedule, you can use the generic Recurrence
2727

2828
> [!NOTE]
2929
>
30-
> To start and run your workflow only once in the future, use workflow template named
31-
> **Scheduler: Run Once Jobs**. This template uses the Request trigger and HTTP action,
32-
> rather than the Recurrence trigger, which doesn't support this recurrence pattern.
33-
> For more information, see [Run jobs one time only](../logic-apps/concepts-schedule-automated-recurring-tasks-workflows.md#run-once).
30+
> Advanced scheduling options, such as **At these hours** and **At these days**, are available and
31+
> work only with built-in polling triggers, such as the **Recurrence** and **Sliding Window** triggers,
32+
> which directly run with the Azure Logic Apps runtime. For connectors that are Microsoft-managed,
33+
> hosted, and run in Azure, polling triggers calculate the next recurrence by using only the
34+
> **Interval** and **Frequency** values, not the advanced scheduling options.
3435
35-
The Recurrence trigger isn't associated with any specific service, so you can use the trigger with almost any workflow, such as [Consumption logic app workflows and Standard logic app *stateful* workflows](../logic-apps/logic-apps-overview.md#resource-environment-differences). This trigger is currently unavailable for [Standard logic app *stateless* workflows](../logic-apps/logic-apps-overview.md#resource-environment-differences).
36+
The **Recurrence** trigger isn't associated with any specific service, so you can use the trigger with almost any workflow, such as [Consumption logic app workflows and Standard logic app *stateful* workflows](../logic-apps/logic-apps-overview.md#resource-environment-differences). This trigger is currently unavailable for [Standard logic app *stateless* workflows](../logic-apps/logic-apps-overview.md#resource-environment-differences).
3637

37-
The Recurrence trigger is part of the built-in Schedule connector and runs natively on the Azure Logic Apps runtime. For more information about the built-in Schedule triggers and actions, see [Schedule and run recurring automated, tasks, and workflows with Azure Logic Apps](../logic-apps/concepts-schedule-automated-recurring-tasks-workflows.md).
38+
The **Recurrence** trigger is part of the built-in Schedule connector and runs natively on the Azure Logic Apps runtime. For more information about the built-in Schedule triggers and actions, see [Schedule and run recurring automated, tasks, and workflows with Azure Logic Apps](../logic-apps/concepts-schedule-automated-recurring-tasks-workflows.md).
3839

3940
## Prerequisites
4041

@@ -45,7 +46,7 @@ The Recurrence trigger is part of the built-in Schedule connector and runs nativ
4546
> [!NOTE]
4647
>
4748
> If you created a Standard logic app workflow, make sure to create a *stateful* workflow.
48-
> The Recurrence trigger is currently unavailable for stateless workflows.
49+
> The **Recurrence** trigger is currently unavailable for stateless workflows.
4950
5051
<a name="add-recurrence-trigger"></a>
5152

@@ -78,9 +79,9 @@ Based on whether your workflow is [Consumption or Standard](../logic-apps/logic-
7879

7980
* Provide a start date and time for the recurrence and the specific times to run subsequent recurrences. You can use the properties named **At these hours** and **At these minutes**, which are available only for the **Day** and **Week** frequencies.
8081

81-
* For Consumption logic app workflows, use the [Sliding Window trigger](../connectors/connectors-native-sliding-window.md), rather than the Recurrence trigger.
82+
* For Consumption logic app workflows, use the [Sliding Window trigger](../connectors/connectors-native-sliding-window.md), rather than the **Recurrence** trigger.
8283

83-
* If you deploy a disabled Consumption workflow that has a Recurrence trigger using an ARM template, the trigger instantly fires when you enable the workflow unless you set the **Start time** parameter before deployment.
84+
* If you deploy a disabled Consumption workflow that has a **Recurrence** trigger using an ARM template, the trigger instantly fires when you enable the workflow unless you set the **Start time** parameter before deployment.
8485

8586
1. To set advanced scheduling options, open the **Add new parameter** list. Any options that you select appear on the trigger after selection.
8687

@@ -94,7 +95,7 @@ Based on whether your workflow is [Consumption or Standard](../logic-apps/logic-
9495

9596
![Screenshot for Consumption workflow designer and Recurrence trigger with advanced scheduling options.](./media/connectors-native-recurrence/recurrence-trigger-advanced-consumption.png)
9697

97-
For example, suppose that today is Friday, September 4, 2020. The following Recurrence trigger doesn't fire *any sooner* than the specified start date and time, which is Friday, September 18, 2020 at 8:00 AM Pacific Time. However, the recurrence schedule is set for 10:30 AM, 12:30 PM, and 2:30 PM on Mondays only. The first time that the trigger fires and creates a workflow instance is on Monday at 10:30 AM. To learn more about how start times work, see these [start time examples](../logic-apps/concepts-schedule-automated-recurring-tasks-workflows.md#start-time).
98+
For example, suppose that today is Friday, September 4, 2020. The following **Recurrence** trigger doesn't fire *any sooner* than the specified start date and time, which is Friday, September 18, 2020 at 8:00 AM Pacific Time. However, the recurrence schedule is set for 10:30 AM, 12:30 PM, and 2:30 PM on Mondays only. The first time that the trigger fires and creates a workflow instance is on Monday at 10:30 AM. To learn more about how start times work, see these [start time examples](../logic-apps/concepts-schedule-automated-recurring-tasks-workflows.md#start-time).
9899

99100
Future runs happen at 12:30 PM and 2:30 PM on the same day. Each recurrence creates their own workflow instance. After that, the entire schedule repeats all over again next Monday. [*What are some other example occurrences?*](../logic-apps/concepts-schedule-automated-recurring-tasks-workflows.md#example-recurrences)
100101

@@ -140,7 +141,7 @@ Based on whether your workflow is [Consumption or Standard](../logic-apps/logic-
140141

141142
* To make sure that your workflow doesn't miss a recurrence, especially when the frequency is in days or longer, try providing a start date and time for the recurrence and the specific times to run subsequent recurrences. You can use the properties named **At These hours** and **At These minutes**, which are available only for the **Day** and **Week** frequencies.
142143

143-
For example, suppose that today is Friday, September 4, 2020. The following Recurrence trigger doesn't fire *any sooner* than the specified start date and time, which is Friday, September 18, 2020 at 8:00 AM Pacific Time. However, the recurrence schedule is set for 10:30 AM, 12:30 PM, and 2:30 PM on Mondays only. The first time that the trigger fires and creates a workflow instance is on Monday at 10:30 AM. To learn more about how start times work, see these [start time examples](../logic-apps/concepts-schedule-automated-recurring-tasks-workflows.md#start-time).
144+
For example, suppose that today is Friday, September 4, 2020. The following **Recurrence** trigger doesn't fire *any sooner* than the specified start date and time, which is Friday, September 18, 2020 at 8:00 AM Pacific Time. However, the recurrence schedule is set for 10:30 AM, 12:30 PM, and 2:30 PM on Mondays only. The first time that the trigger fires and creates a workflow instance is on Monday at 10:30 AM. To learn more about how start times work, see these [start time examples](../logic-apps/concepts-schedule-automated-recurring-tasks-workflows.md#start-time).
144145

145146
Future runs happen at 12:30 PM and 2:30 PM on the same day. Each recurrence creates their own workflow instance. After that, the entire schedule repeats all over again next Monday. [*What are some other example occurrences?*](../logic-apps/concepts-schedule-automated-recurring-tasks-workflows.md#example-recurrences)
146147

@@ -160,7 +161,7 @@ Based on whether your logic app is Consumption or Standard, choose one of the fo
160161

161162
* **Standard**: On the workflow menu, select **Code view**. To return to the designer, on the workflow menu, select **Designer**.
162163

163-
The following example shows how a Recurrence trigger definition might appear in the workflow's underlying JSON definition:
164+
The following example shows how a **Recurrence** trigger definition might appear in the workflow's underlying JSON definition:
164165

165166
``` json
166167
"triggers": {
@@ -191,7 +192,7 @@ The following example shows how a Recurrence trigger definition might appear in
191192

192193
> [!NOTE]
193194
>
194-
> In the Recurrence trigger definition, the `evaluatedRecurrence` property appears along with the `recurrence` property
195+
> In the **Recurrence** trigger definition, the `evaluatedRecurrence` property appears along with the `recurrence` property
195196
> when any expression or parameter reference appears in the recurrence criteria. This `evaluatedRecurrence` property
196197
> represents the evaluated values from the expression or parameter reference. If the recurrence criteria doesn't
197198
> specify any expressions or parameter references, the `evaluatedRecurrence` and `recurrence` properties are the same.
@@ -213,6 +214,51 @@ The following example shows how to update the trigger definition so that the tri
213214
}
214215
```
215216

217+
<a name="run-once"></a>
218+
219+
## Run one time only
220+
221+
To run your workflow only at one time in the future, you can apply the **Scheduler: Run once jobs** workflow template, which is available only for Consumption logic app workflows. This template uses the **Request** trigger and **HTTP** action, rather than the **Recurrence** trigger, which doesn't support this recurrence pattern.
222+
223+
1. In the [Azure portal](https://portal.azure.com), create a Consumption logic app.
224+
225+
1. In the designer, open the blank workflow. On the designer toolbar, select **Enable Legacy Designer**.
226+
227+
1. On the designer toolbar, select **Templates**.
228+
229+
1. On the page that opens, scroll past the video to the **Templates** section.
230+
231+
1. From the **Category** list, select **Schedule**, and then select the following template:
232+
233+
:::image type="content" source="media/connectors-native-recurrence/choose-run-once-template.png" alt-text="Screenshot shows the selected template named Scheduler Run once jobs." lightbox="media/connectors-native-recurrence/choose-run-once-template.png":::
234+
235+
1. On the designer toolbar, select **Generally Available Designer**.
236+
237+
1. [Follow these general steps to add the **Schedule** action named **Delay until**](../logic-apps/create-workflow-with-trigger-or-action.md?tabs=consumption#add-action), and provide the time for when the next action starts running.
238+
239+
Or, you can start your workflow with the **Request** trigger named **When a HTTP request is received**, and pass the start time as a parameter for the trigger.
240+
241+
<a name="run-only-last-day-of-month"></a>
242+
243+
## Run one time on last day of the month
244+
245+
For this task, you have to edit the **Recurrence** trigger in the workflow's underlying JSON definition using code view, not the designer, by using the following example:
246+
247+
```json
248+
"triggers": {
249+
"Recurrence": {
250+
"recurrence": {
251+
"frequency": "Month",
252+
"interval": 1,
253+
"schedule": {
254+
"monthDays": [-1]
255+
}
256+
},
257+
"type": "Recurrence"
258+
}
259+
}
260+
```
261+
216262
<a name="daylight-saving-standard-time"></a>
217263

218264
## Trigger recurrence shift and drift (daylight saving time)

0 commit comments

Comments
 (0)