Schedule workflow doesn't work


#1

I have following config with scheduled-workflow to start scheduled jobs every 20 minutes, and commit-workflow. Scheduled workflow never starts, however commit workflow works fine. What do I do wrong?

version: 2
jobs:
  run_tests:
    docker:
      - image: circleci/java:8u121-jdk
    steps:
      - checkout
      - run:
          name: test
          command: mvn test -Dbrowser=chrome -B

workflows:
  version: 2
  commit-workflow:
    jobs:
      - run_tests
  scheduled-workflow:
    triggers:
      - schedule:
          cron: "*/20 * * * *"
          filters:
            branches:
              only: master

    jobs:
      - run_tests

#2

We don’t support the step syntax (e.g., */1, */20, etc).
But this will work:

0,20,40 * * * *

#3

Could this be mentioned in docs explicitly?

I’ve tried using */x syntax, got no error and wondering why my builds are not started. I thought all crons support such syntax. Also better error handling / validation in such case would be nice.


#4

For sure! Just put in a PR:

https://github.com/circleci/circleci-docs/pull/1792/files

I originally thought so, too, but crontab does not:
http://pubs.opengroup.org/onlinepubs/7908799/xcu/crontab.html

100% agreed.


#5

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