5

I want a pipeline to trigger every six months. It s a compliance requirement for code scanning. So I created a schedule:

schedules:
  - cron: "0 0 1 */6 *"

    branches:
     include:
       - master
    always: true

But this pipeline is triggering on every commit to master. It is my understanding that it should not. Did I not understand the scheduled trigger?

Tauqir
  • 369
  • 1
  • 5
  • 15

1 Answers1

7

Based on my test, I could reproduce the similar issue.

When I commit changes to master, the build reason is CI Trigger.

enter image description here

You could try to add the trigger: none in your yaml file. Then you could disable the CI Trigger.

Here is an example:

trigger: none

schedules:
  - cron: "0 0 1 */6 *"
    branches:
     include:
       - master
    always: true
Kevin Lu-MSFT
  • 20,786
  • 3
  • 19
  • 28