Scheduled workflow does not run

Hi,

Cannot make my scheduled workflow to run on the time specified.
Could someone take a look?

Thanks

Zvika

version: 2
    jobs:
      build:
        docker:
          - image: example/infra-deployer
        steps:
          - checkout
          - setup_remote_docker
          - run:
              name: Run Commands
              command: |
                chmod +x ./run.sh
                ./run.sh ${PROJECT_NAME}
      run_action:
        docker:
          - image: example/infra-deployer
        steps:
          - checkout
          - setup_remote_docker
          - run:
              name: AllDestroy
              command: |
                echo "$ALLOW_DESTROY"
                if [[ ${ALLOW_DESTROY} == "true" ]]
                then
                  curl -i -X POST \
                  -H "Content-Type:application/json" \
                  -d \
                  '{"build_parameters":
                    {
                      "ACTION": "allDestroy",
                      "PROJECT_ID": "shark-202612",
                      "PROJECT_NAME": "shark",
                      "GCLOUD_CREDENTIALS": "gcloud-service-key.json",
                      "ZONE1": "us-central1-a",
                      "ISTIO_VERSION": "0.7.1",
                      "KITE_DOMAIN": "example",
                      "KITE_PROJECT": "mesh",
                    }
                  }' \
                  'https://circleci.com/api/v1.1/project/github/example/example-infra?circle-token="${CIRCLE_TOKEN}"'
                fi
    workflows:
      version: 2
      commit:
        jobs:
          - build
      scheduled_job:
        jobs:
          - run_action
        triggers:
          - schedule:
              cron: "30 12 * * *"
              filters:
                branches:
                  only:
                    - scheduled_destroy

Here’s my working workflow declaration; it works with or without the commented out schedule. See what is different - maybe the branch filter?

# Scheduled builds
# (Format: Minute hour DOM month DOW)
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

Make sure you indentation is correct, too - that gets people a lot here. Run it through a validator to ensure you don’t have any tabs masquerading as spaces.

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