Wednesday, March 16, 2022

[SOLVED] Azure cron scheduled pipeline always running (without failing builds)

Issue

Azure scheduled pipeline runs for every push in master.
What am I missing?
Here's the yaml code:

schedules:
- cron: "0 23 * * *"
  displayName: Nightly build
  branches:
    include:
    - master

Apparently, the previous builds aren't failing. I've already tried to remove this pipeline and create it again, but it keeps running for every push.

enter image description here

The scheduled runs are correct:

enter image description here


Solution

Ok, I think I figured this out.
Just added the following lines to the yml file and it no longer runs the scheduled pipeline on every push.

trigger: none

pr: none


Answered By - DMVC
Answer Checked By - David Goodson (WPSolving Volunteer)