Scchheduled trigger is not working as expected in Azzure DevOps - YAML

Diptesh Kumar 471 Reputation points
2025-04-26T05:53:09.56+00:00

Here is the YAML file we use:

schedules:

  - cron: '45 0 * * 6'

    displayName: 19:45 PM (UTC-5 ) Friday build

    branches:

     include:

       - master

resources:

  repositories:

    - repository: self

      type: git

      ref: refs/heads/master

jobs:

  - job: Job_1

    displayName: Agent job 1

    pool:

      name: Default

    steps:

      - checkout: self

        fetchDepth: 1

      - task: PowerShell@2

        displayName: 'CleanUp user PowerShell Script'

        inputs:

          targetType: 'inline'

          script: |

            # Import the Active Directory module

              Write-host :"hello world: 

          publishLocation: 'Container'

when I click on pipeline --> 2 dots --> schedlued runs : I see following message:

i am seeing following message Scheduled runs There are no scheduled runs for this week. See schedules to learn about configuring or diagnosing problems with scheduled runs. If you believe this to be incorrect, select ‘Sync Schedules’ to read the schedules from the YAML file in default branch.

why it is so?

why pipeline is not triggering since March 29th?

here are the screenshots from trigger:

User's image

when I ran manually pipeline is working as expected:

Please suggest fix:

Azure DevOps
0 comments No comments
{count} votes

Accepted answer
  1. RithwikBojja 2,325 Reputation points Microsoft External Staff Moderator
    2025-04-29T04:45:01.7333333+00:00

    Hi @Diptesh Kumar ,

    After setting up the Trigger in YAML, one needs to click on Sync Schedules, then it sinks the Schedule to the pipeline, I have placed a trigger at 10:10 am and later clicked on Sync Schedules, after that it has shown me the schedule:

    enter image description here

    Below is the YAML script:

    
    trigger: none  
    
    schedules:
    
      - cron: "40 4 * * 2"
    
        displayName: "10:40 AM IST - Tuesday Run"
    
        branches:
    
          include:
    
            - main
    
        always: true
    
    pool:
    
      vmImage: 'ubuntu-latest'
    
    jobs:
    
      - job: SampleJob
    
        steps:
    
          - script: echo "Hello Rithwik, it is triggering at scheduled time"
    
    

    Output:

    enter image description here

    enter image description here

    Make sure to keep the correct branch in the yaml script.


    If this answer was helpful, please click "Accept the answer" and mark Yes, as this can help other community members.

    enter image description here

    If you have any other questions or are still experiencing issues, feel free to ask in the "comments" section, and I'd be happy to help.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.