Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scheduled builds never trigger in azure devops pipeline

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?

like image 797
Wez Furlong Avatar asked Jun 25 '19 14:06

Wez Furlong


People also ask

How do I run an Azure DevOps pipeline on a schedule?

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.

What triggers can I use to start my Azure pipelines?

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.

Why are my schedules not showing up in azure pipelines?

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.

Can I schedule a YAML build in Azure DevOps?

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.


1 Answers

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
like image 139
abdokhaire Avatar answered Sep 30 '22 17:09

abdokhaire