Skip to content

Commit 612ce7d

Browse files
Steve DanielsonSteve Danielson
authored andcommitted
More zones and remove all inclusive moniker ranges
1 parent 61ca6cc commit 612ce7d

File tree

1 file changed

+18
-58
lines changed

1 file changed

+18
-58
lines changed

docs/pipelines/process/scheduled-triggers.md

Lines changed: 18 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ schedules:
7676

7777
::: moniker-end
7878

79-
::: moniker range="<=azure-devops"
80-
8179
Scheduled pipelines in YAML have the following constraints.
8280

8381
- The time zone for cron schedules is UTC. [You can get AI assistance from GitHub Copilot to create your cron expressions](#use-github-copilot-to-create-a-cron-expression).
@@ -150,8 +148,6 @@ schedules:
150148

151149
Because `release` was added to the branch filters in the `main` branch, but **not** to the branch filters in the `release` branch, the `release` branch won't be built on that schedule. Only when the `release` branch is added to the branch filters in the YAML file **in the release branch** will the scheduled build be added to the scheduler.
152150

153-
::: moniker-end
154-
155151
::: moniker range=">=azure-devops-2022"
156152

157153
### Batch considerations for scheduled triggers
@@ -220,9 +216,7 @@ If your repository is Azure Repos Git, GitHub, or Other Git, then you can also s
220216

221217
## Examples
222218

223-
#### [YAML](#tab/yaml/)
224-
225-
::: moniker range="<=azure-devops"
219+
:::zone pivot="pipelines-yaml"
226220

227221
The following example defines two schedules:
228222

@@ -253,14 +247,12 @@ The second schedule, **Weekly Sunday build**, runs a pipeline at noon on Sundays
253247

254248
For more examples, see [Migrating from the classic editor](#migrating-from-the-classic-editor).
255249

256-
::: moniker-end
250+
:::zone-end
257251

258-
#### [Classic](#tab/classic/)
252+
:::zone pivot="pipelines-classic"
259253

260254
#### Example: Nightly build of Git repo in multiple time zones
261255

262-
::: moniker range="<=azure-devops"
263-
264256
In this example, the classic editor scheduled trigger has two entries, which produce the following builds.
265257

266258
* Every Monday - Friday at 3:00 AM (UTC + 5:30 time zone), build branches that meet the `features/india/*` branch filter criteria
@@ -271,14 +263,8 @@ In this example, the classic editor scheduled trigger has two entries, which pro
271263

272264
![Scheduled trigger UTC -5:00 time zone](media/triggers/scheduled-trigger-git-nc.png)
273265

274-
::: moniker-end
275-
276266
#### Example: Nightly build with different frequencies
277267

278-
::: moniker range="<=azure-devops"
279-
280-
**Azure Pipelines and Azure DevOps 2019 Server**
281-
282268
In this example, the classic editor scheduled trigger has two entries, producing the following builds.
283269

284270
* Every Monday - Friday at 3:00 AM UTC, build branches that meet the `main` and `releases/*` branch filter criteria
@@ -289,16 +275,12 @@ In this example, the classic editor scheduled trigger has two entries, producing
289275

290276
![Scheduled trigger frequency 2, Azure Pipelines and Azure DevOps 2019 Server.](media/triggers/scheduled-trigger-git-weekly-night.png)
291277

292-
::: moniker-end
278+
:::zone-end
293279

294-
* * *
280+
:::zone pivot="pipelines-yaml"
295281

296282
## Cron syntax
297283

298-
#### [YAML](#tab/yaml/)
299-
300-
::: moniker range="<=azure-devops"
301-
302284
Each Azure Pipelines scheduled trigger cron expression is a space-delimited expression with five entries in the following order. The expression is enclosed in single quotes `'`.
303285

304286
```
@@ -370,19 +352,11 @@ Build a UTC cron expression for Monday through Friday at 12:30 AM Central Europe
370352

371353
*Copilot is powered by AI, so surprises and mistakes are possible. For more information, see [Copilot general use FAQs](https://aka.ms/copilot-general-use-faqs).*
372354

373-
::: moniker-end
374-
375-
#### [Classic](#tab/classic/)
376-
377-
Classic schedules are defined using a graphical editor instead of cron syntax. For information on defining classic schedules, see [Examples](#examples).
378-
379-
* * *
355+
:::zone-end
380356

381357
## Scheduled runs view
382358

383-
#### [YAML](#tab/yaml/)
384-
385-
::: moniker range="<=azure-devops"
359+
:::zone pivot="pipelines-yaml"
386360

387361
You can view a preview of upcoming scheduled builds by choosing **Scheduled runs** from the context menu on the [pipeline details page](../create-first-pipeline.md#view-pipeline-details) for your pipeline.
388362

@@ -411,10 +385,9 @@ The **Scheduled runs** windows displays the times converted to the local time zo
411385
> [!NOTE]
412386
> If you update the schedule for a running pipeline, the **Scheduled runs** view isn't updated with the new schedule until the currently running pipeline completes.
413387
414-
::: moniker-end
388+
:::zone-end
415389
416-
#### [Classic](#tab/classic/)
417-
::: moniker range=">= azure-devops-2020"
390+
:::zone pivot="pipelines-classic"
418391
419392
You can view a preview of upcoming scheduled builds by choosing **Scheduled runs** from the context menu on the [pipeline details page](../create-first-pipeline.md#view-pipeline-details) for your pipeline.
420393
@@ -424,22 +397,14 @@ After you create or update your scheduled triggers, you can verify them using th
424397
425398
![Scheduled runs](media/triggers/scheduled-runs-classic.png)
426399
427-
::: moniker-end
428-
429-
* * *
400+
:::zone-end
430401
431402
<a name="always"></a>
432403
## Running even when there are no code changes
433404
434-
::: moniker range="<=azure-devops"
435-
436405
By default, your pipeline doesn't run as scheduled if there have been no code changes since the last successful scheduled run. For instance, consider that you've scheduled a pipeline to run every night at 9:00pm. During the weekdays, you push various changes to your code. The pipeline runs as per schedule. During the weekends, you don't make any changes to your code. If there have been no code changes since the scheduled run on Friday, then the pipeline doesn't run as scheduled during the weekend.
437406
438-
::: moniker-end
439-
440-
#### [YAML](#tab/yaml/)
441-
442-
::: moniker range="<=azure-devops"
407+
:::zone pivot="pipelines-yaml"
443408
444409
To force a pipeline to run even when there are no code changes, you can use the `always` keyword.
445410

@@ -450,19 +415,17 @@ schedules:
450415
always: true
451416
```
452417

453-
::: moniker-end
418+
:::zone-end
454419

455-
#### [Classic](#tab/classic/)
456-
457-
::: moniker range="<=azure-devops"
420+
:::zone pivot="pipelines-classic"
458421

459422
To configure the scheduled pipeline to build only if there has been a change since the last build, check **Only schedule builds if the source or pipeline has changed**.
460423

461424
![Scheduled trigger UTC + 5:30 time zone](media/triggers/scheduled-trigger-git-india.png)
462425

463-
::: moniker-end
426+
:::zone-end
464427

465-
* * *
428+
:::zone pivot="pipelines-yaml"
466429

467430
<a name="limits"></a>
468431
## Limits on the number of scheduled runs in YAML pipelines
@@ -471,7 +434,8 @@ There are certain limits on how often you can schedule a pipeline to run. These
471434
- around 1000 runs per pipeline per week
472435
- 10 runs per pipeline per 15 minutes
473436

474-
::: moniker range="<=azure-devops"
437+
:::zone-end
438+
475439
## Migrating from the classic editor
476440

477441
The following examples show you how to migrate your schedules from the classic editor to YAML.
@@ -568,10 +532,6 @@ In the second schedule, **Sunday 3:00 AM (UTC) weekly latest version build**, th
568532
* Days of the week - `Sun` - Because our timezone conversions don't span multiple days of the week for our desired schedule, we don't need to do any conversion here. We could also specify the days of the week as `0`.
569533
* We also specify `always: true` since this build is scheduled to run whether or not the source code has been updated.
570534

571-
::: moniker-end
572-
573-
::: moniker range=">=azure-devops-2020"
574-
575535
## FAQ
576536

577537
* [I want my pipeline to run only on the schedule and not when someone pushes a change to a branch](#i-want-my-pipeline-to-run-only-on-the-schedule-and-not-when-someone-pushes-a-change-to-a-branch)
@@ -650,4 +610,4 @@ schedules:
650610

651611
For more information, see [Branch considerations for scheduled triggers](#branch-considerations-for-scheduled-triggers).
652612

653-
::: moniker-end
613+

0 commit comments

Comments
 (0)