Scheduled workflow doesnt fire

Hi all,
I have the following config:

version: 2.1

jobs:
  build:
    machine: true
    steps:
      - checkout
      - run:
          command: make
          name: build
      - store_artifacts:
          path: build/Manifest
      - store_artifacts:
          path: build/environment.bz2
      - store_artifacts:
          path: build/smoketest
      - run:
          command: make push-image
          name: push image

workflows:
  version: 2
  commit:
    jobs:
      - build
  weekly:
    triggers:
      - schedule:
          cron: "20 20 * * 2"
          filters:
            branches:
              only:
                - master
    jobs:
      - build

Or see the original file on github – the “commit” workflow works fine from what I can see, however the “weekly” workflow is never triggered. I have not found linting complain about the config, either. Any hint, why this workflow does not start once a week is highly welcome.

Thanks,

Bjoern

Hi @bjoernmichaelsen, and welcome to the CircleCI community!

In the branch filter you specified: master. However, looking at the GitHub repository, I see that the only branch is: main.

Try replacing master with main in the config.yml:

          filters:
            branches:
              only:
                - main

and then push a new commit to the main branch.

Let me know if this helps.

@yannCI, thanks for the reply! I did the change, will report back if it fires next Tuesday!

(Also: As master is slowly replaced with main as default on github and elsewhere it might make sense to update the docs, e.g. at: Using Workflows to Schedule Jobs - CircleCI). Either add a note about master/main or have the examples have both, like:

          filters:
            branches:
              only:
                - main
                - master

If having both branch names in the example it is much easier to figure out as a reader with a schedule not starting.

Thank you again!

Best,

Bjoern

Yup, that worked.

Thank you, @yannCI!

Best, Bjoern

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.