How to use cron schedules with dynamic config

I’m trying to port an existing monorepo setup to use the newly introduced dynamic config feature.

I can get the setup step to successfully render my dynamic configuration file and have the continuation orb trigger the pipeline run, yet I am running into one issue I do not know how to solve:

The existing setup has a weekly job that does some resetting of our messy development resources on a cron schedule. Right now this is defined as a dedicated workflow in our config.yml using triggers.

When I want to do the same thing in my setup workflow (i.e. define multiple workflows) I will get the following error message: Max number of workflows exceeded.. My config looks like this:

version: 2.1

setup: true

jobs:
  generate-config:
    docker:
      - image: cimg/node:14.15
    steps:
      - checkout
      - run:
          name: Render configuration
          command: |
            ./.circleci/render-config.js ./.circleci/continue_config.yml
      - continuation/continue:
          configuration_path: ./.circleci/continue_config.yml

workflows:
  setup-workflow-schedule:
    triggers:
      - schedule:
          cron: 0 12 * * 0 # every sunday at noon
          filters:
            branches:
              only:
                - develop
    jobs:
      - generate-config

  setup-workflow-push:
    jobs:
      - generate-config

orbs:
  continuation: circleci/continuation@0.1.0

When I only define the trigger, it will run, but pushes stop being built.

Am I doing something wrong when setting this up or is this a (current) limitation of dynamic configuration? Is there any way I could work around this?

3 Likes