schedules.cron definition
A scheduled trigger specifies a schedule on which branches are built.
schedules:
- cron: string # Required as first property. Cron syntax defining a schedule in UTC time..
displayName: string # Optional friendly name given to a specific schedule..
branches: # Branch names to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
batch: boolean # Whether to run the pipeline if the previously scheduled run is in-progress; the default is false.. (false,n,no,off,on,true,y,yes)
always: boolean # Whether to always run the pipeline or only if there have been source code changes since the last successful scheduled run; the default is false.. (false,n,no,off,on,true,y,yes)
Properties that use this definition: schedules
Properties
cron
string
Required as first parameter. Cron syntax defining a schedule in UTC time.displayName
string
Optional friendly name given to a specific schedule.branches
include/exclude string list
Branch names to include or exclude for triggering a run.batch
boolean
Whether to run the pipeline if the previously scheduled run is in-progress; the default is false.always
boolean
Whether to always run the pipeline or only if there have been source code changes since the last successful scheduled run; the default is false.schedules:
- cron: string # Required as first property. Cron syntax defining a schedule in UTC time..
displayName: string # Optional friendly name given to a specific schedule..
branches: # Branch names to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
batch: boolean # Whether to run the pipeline if the previously scheduled run is in-progress; the default is false.. (false,n,no,off,on,true,y,yes)
always: boolean # Whether to always run the pipeline or only if there have been source code changes since the last successful scheduled run; the default is false.. (false,n,no,off,on,true,y,yes)
Properties that use this definition: schedules
Properties
cron
string
Required as first parameter. Cron syntax defining a schedule in UTC time.displayName
string
Optional friendly name given to a specific schedule.branches
include/exclude string list
Branch names to include or exclude for triggering a run.batch
boolean
Whether to run the pipeline if the previously scheduled run is in-progress; the default is false.always
boolean
Whether to always run the pipeline or only if there have been source code changes since the last successful scheduled run; the default is false.schedules:
- cron: string # Required as first property. Cron syntax defining a schedule in UTC time..
displayName: string # Optional friendly name given to a specific schedule..
branches: # Branch names to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
batch: boolean # Whether to run the pipeline if the previously scheduled run is in-progress; the default is false.. (false,n,no,off,on,true,y,yes)
always: boolean # Whether to always run the pipeline or only if there have been source code changes since the last successful scheduled run; the default is false.. (false,n,no,off,on,true,y,yes)
Properties that use this definition: schedules
Properties
cron
string
Required as first parameter. Cron syntax defining a schedule in UTC time.displayName
string
Optional friendly name given to a specific schedule.branches
include/exclude string list
Branch names to include or exclude for triggering a run.batch
boolean
Whether to run the pipeline if the previously scheduled run is in-progress; the default is false.always
boolean
Whether to always run the pipeline or only if there have been source code changes since the last successful scheduled run; the default is false.schedules:
- cron: string # Required as first property. Cron syntax defining a schedule in UTC time..
displayName: string # Optional friendly name given to a specific schedule..
branches: # Branch names to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
batch: boolean # Whether to run the pipeline if the previously scheduled run is in-progress; the default is false.. (false,n,no,off,on,true,y,yes)
always: boolean # Whether to always run the pipeline or only if there have been source code changes since the last successful scheduled run; the default is false.. (false,n,no,off,on,true,y,yes)
Properties that use this definition: schedules
Properties
cron
string
Required as first parameter. Cron syntax defining a schedule in UTC time.displayName
string
Optional friendly name given to a specific schedule.branches
include/exclude string list
Branch names to include or exclude for triggering a run.batch
boolean
Whether to run the pipeline if the previously scheduled run is in-progress; the default is false.always
boolean
Whether to always run the pipeline or only if there have been source code changes since the last successful scheduled run; the default is false.Remarks
If you specify no scheduled trigger, no scheduled builds occur.
Note
If you specify an exclude clause without an include clause for branches, it is equivalent to specifying * in the include clause.
Examples
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- main
- releases/*
exclude:
- releases/ancient/*
- cron: "0 12 * * 0"
displayName: Weekly Sunday build
branches:
include:
- releases/*
always: true
In the preceding example, two schedules are defined.
The first schedule, Daily midnight build, runs a pipeline at midnight every day only if the code has changed since the last successful scheduled run.
It runs the pipeline for main and all releases/* branches, except for those branches under releases/ancient/*.
The second schedule, Weekly Sunday build, runs a pipeline at noon on Sundays for all releases/* branches.
It does so regardless of whether the code has changed since the last run.
See also
- Learn more about scheduled triggers.
- Learn more about triggers in general and how to specify them.
Feedback
Submit and view feedback for