Scheduled Trigger Preventing Commit Triggers


#1

Hello! I am pretty new to CircleCI, but very impressed so far.

I am trying to have an on-commit workflow and a scheduled workflow that will build the same branch. When I have both workflows setup without any scheduled trigger and I commit, I see two builds start which is expected. But when I add the below commented scheduled trigger and commit, neither of my jobs start.

Am I missing something here? What can I do to get scheduled triggers to get a scheduled trigger working as I am trying to?

I have the following circle config:

version: 2
jobs:
  dev:
    macos:
      xcode: "9.2.0"
    shell: /bin/bash --login -eo pipefail
    steps:
      - checkout
      - run:
          name: Install Gems
          command: bundler install
      - run:
          name: Badge App Icons
          command: bundler exec fastlane ios update_icon
      - run:
          name: Build And Upload Dev App
          command: bundler exec fastlane ios CNN_Dev compare_url:${CIRCLE_COMPARE_URL}
      - run:
          name: Upload dSYM
          command: ./Scripts/AppD-dSYM.sh
      - store_artifacts:
          path: CNN.ipa
      - store_artifacts:
          path: CNN.app.dSYM.zip

  qa:
    macos:
      xcode: "9.2.0"
    shell: /bin/bash --login -eo pipefail
    steps:
      - checkout
      - run:
          name: Install Gems
          command: bundler install
      - run:
          name: Badge App Icons
          command: bundler exec fastlane ios update_icon
      - run:
          name: Build And Upload QA App
          command: bundler exec fastlane ios CNN_QA compare_url:${CIRCLE_COMPARE_URL}
      - run:
          name: Upload dSYM
          command: ./Scripts/AppD-dSYM.sh
      - store_artifacts:
          path: CNN.ipa
      - store_artifacts:
          path: CNN.app.dSYM.zip

workflows:
  version: 2
  commit:
    jobs:
      - dev:
          filters:
            branches:
              only:
                - feature/match

  scheduled:
    jobs:
      - qa:
          filters:
            branches:
              only:
                - feature/match
# Uncommenting these lines will prevent both from running!
#    triggers:
#      - schedule:
#        cron: "0 0 * * *"

#2

Like you would expect, I was able to resolve my own issue about 5 minutes after posting.

In case you don’t know this (like I didn’t). If your workflows stop working, you can click the workflows tab and find an error that may help you track down your problem.

Here is what ended up working for me:

  scheduled:
    jobs:
      - qa
    triggers:
      - schedule:
          cron: "0 0 * * *"
          filters:
            branches:
              only:
                - feature/match

#3

You had a nice chat with the duck! :duck:


#4

I had this problem too. To run a build twice a day, while retaining build-on-push, I use this:

workflows:
  version: 2
  commit-workflow:
    jobs:
      - build
  daily-workflow-1:
    triggers:
      - schedule:
          cron: "0 14 * * *"
          filters:
            branches:
              only:
                - master
    jobs:
      - build
  daily-workflow-2:
    triggers:
      - schedule:
          cron: "0 22 * * *"
          filters:
            branches:
              only:
                - master
    jobs:
      - build

#5

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