I have the following configuration in my open source project hosted on GitHub: https://github.com/wez/wezterm/blob/master/azure-pipelines.yml#L9
schedules:
- cron: "0 0 * * *"
displayName: Daily build
always: true
branches:
include:
- master
my azure org is https://dev.azure.com/wez0788/wezterm. My project is open source and using the free tier.
The schedule doesn't appear to have any effect; no scheduled build shows up in the list of builds.
The documentation for build triggers has a troubleshooting section that doesn't have any useful information on why a scheduled build wasn't scheduled. It's not even clear if the syntax is correct as there is no UI to indicate whether the pipeline has picked up the schedule. The config is sufficient that pushes to the repo and PRs do trigger successful builds.
This question sounds similar, but with the notable difference that I've never had a single scheduled build ever run, so it's not an intermittent problem: Azure DevOps build pipeline unreliable triggering by schedule
Someone else appears to be having the same problem and filed a GH issue over here, but since that was a doc issue tracker it got closed: https://github.com/MicrosoftDocs/vsts-docs/issues/4589
How can I get my scheduled build to actually run?
To run an Azure DevOps pipeline on a schedule you can use a ‘scheduled trigger’ in your pipeline YAML definition, or specify it in the Azure DevOps portal. NOTE: the pr: none and trigger: none must be set to use scheduled triggers. Without these set your pipeline will run every time you commit your code if you have CI enabled.
Azure Pipelines provides several types of triggers to configure how your pipeline starts. Scheduled triggers start your pipeline based on a schedule, such as a nightly build. This article provides guidance on using scheduled triggers to run your pipelines based on a schedule.
If you do not see the schedules that you expected, make a small trivial change to you YAML file, and push the update to your repository. This should re-sync the schedules. If you use GitHub for storing your code, it is possible that Azure Pipelines may have been throttled by GitHub when it tried to start a new run.
Scheduled builds are not supported in YAML syntax in Azure DevOps Server 2019. After you create your YAML build pipeline, you can use pipeline settings to specify a scheduled trigger. YAML pipelines are not available on TFS. Select the days and times when you want to run the build using the classic editor.
Try to Use the following just replace double quote " with the single quote '
schedules:
- cron: '0 0 * * *'
displayName: Daily build
branches:
include:
- master
always: true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With