skip to Main Content

I’m trying to create a pipeline in Azure DevOps that would trigger every every 2nd and 4th Tuesday of the month regardless if there are changes on the git branches. This is what I have, but it’s not working.

trigger: none
pr: none

schedules:
 cron: '0 8 8-14,22-28 * 2'
 displayName: Trigger every 2nd and 4th Tuesday
 branches:
     include: 
     - develop
  always: true

It is working for this – cron: "*/5 * * * *"(triggering every 5 mintues) but above cron is not working.

2

Answers


  1. Chosen as BEST ANSWER

    This cron works for me

      - cron: 0 8 6-12,20-26  * 2
    

  2. This is not possible with just cron expression in Azure DevOps. This implementation doesn’t support this

    enter image description here

    Take a look on issue here.

    What you can do is to run every Monday and Tuesday and then in first job check if this is a 2nd or 4th. Based on that set variable and use that variable in condition to run or not a real job.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search