1
votes

I have a release pipeline which triggers a PowerShell Script. I want to schedule this release pipeline for every quarter. There is no code change or build happening, just to run the same pipeline and same script. How to set up the quarterly execution of the Azure DevOps Release Pipeline?

2
Did you try below workaround using Trigger Azure DevOps Pipeline extension? It looks promising. - Levi Lu-MSFT
Yes it works. I tested it for a 5 mins job schedule and it worked. We need to add "none" to the yaml pipeline so that when we save it, it does not execute during saving the changes or testing the scheduler. It will only run during the scheduled time. - Yogesh Kulkarni

2 Answers

2
votes

You won't be able to run it out of the box as release pipelines doesn't support cron schedules. But you can combine yaml pipeline with cron schedule with Trigger Azure DevOps Pipeline extension to get this:

schedules:
- cron: "0 0 1 */3 *" 
  displayName: At 00:00 on day-of-month 1 in every 3rd month.
  branches:
    include:
      - master
  always: true

pool:
  vmImage: 'ubuntu-latest'

steps:
- task: TriggerPipeline@1
  inputs:
    serviceConnection: 'DevOps TheCodeManual'
    project: '4fa6b279-3db9-4cb0-aab8-e06c2ad550b2'
    Pipeline: 'Release'
    releaseDefinition: 'DevOps CI Release'
0
votes

pipeline YAML support cron schedules

schedules:
- cron: "0 0 1 */3 *" 
  displayName: At 00:00 on day-of-month 1 in every 3rd month.
  branches:
    include:
      - master
  always: true