Scheduled workflows never run or show up


#1

I have a simple workflow in a branch named eric/foo3.3.5-joint. I push commits there and the commit workflow executes fine, but no matter what schedule I put in I never see an execution of the scheduled workflow. Here’s the workflows section of my yml

workflows:
  version: 2
  commit:
    jobs:
      - build
  houlrly-workflow-1:
    triggers:
      - schedule:
          cron: "0 * * * *"
          filters:
            branches:
              only: eric/foo3.3.5-joint
    jobs:
      - build

There is nothing in the UI showing the houlrly-workflow-1 workflow - I’ve tried about every cron expression as well. What am I doing wrong?


#2

The following works for me:

# 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

Yours looks OK to me. I’d start with switching on whitespace chars to see if you have any tabs in there - that can trip up a lot of YAML parsers.

I wonder though whether the only key needs to be a list? Mine is, and yours is not.


#3

I’ve done both single entry and lists for only - no change.

I’ve verified they’re all spaces and match your spacing exactly.

Are schedules only run once they’re in the master branch? Maybe a limit on branch names (cant have a /?) Do schedules run on free tier users?

Thanks for the help.


#4

OK, that’s pretty odd. I’m on the free tier, works perfectly for me, with BitBucket. Try a few things to experiment, maybe on another repo - yes, try a simpler branch name. Also, check the rest of your YAML file, in case corruption elsewhere means the workflow config is not being seen at all.

It’d be good to have some online validation tools in Circle, but as ever, there’s more good ideas than they will have engineering time for.


#5

I did get it to work on a fresh repo - but sitll not sure what to do.

My entire config.yml is a few small 1 line commands and are valid as they run fine.


#6

Is the config just on that one branch or merged into your default branch?


#7

I don’t see anything referencing a “default” branch in the circleci docs for workflows/schedules or settings for my project.

This is not merged into master as it’s not working yet.

Are schedules only run from default branches - and how do I see/know what that is for my project?


#8

Try disconnecting the project from Circle and then re-discover it.


#9

Default branches are a VCS concept (GitHub/Bitbucket).

No, they should run fine the way you did it. I even ran a few builds last night to tests this (builds #638-644 https://circleci.com/gh/felicianotech/cci-testing-pub).

The only other thing I can suggest right now is to provide more of your config if possible so we can see if there is anything else that might be causing a problem. If it’s private, you can also DM me a build URL.


#10

Thanks for the clarifications Felciano - I’ve DM’d a URL of a branch I’d expect a workflow to run on.


#11

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