# Issue with Combining Scheduled Pipelines and Setup Workflow in the Same Configuration

**URL:** <https://discuss.circleci.com/t/issue-with-combining-scheduled-pipelines-and-setup-workflow-in-the-same-configuration/51791>\
**Category:** Running Tests\
**Tags:** circle-yml\
**Created:** [August 27, 2024, 2:39pm UTC](https://discuss.circleci.com/t/issue-with-combining-scheduled-pipelines-and-setup-workflow-in-the-same-configuration/51791 "2024-08-27T14:39:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lllunara](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/lllunara/32/35535_2.png) [@lllunara](https://discuss.circleci.com/u/lllunara)\
**Post date:** [August 27, 2024, 2:39pm UTC](https://discuss.circleci.com/t/issue-with-combining-scheduled-pipelines-and-setup-workflow-in-the-same-configuration/51791/1 "2024-08-27T14:39:36Z")

</div>

Hello CircleCI Community,

I’m encountering an issue with combining a setup workflow and a scheduled pipeline within the same configuration file. My goal is to use the setup workflow to dynamically configure modules and then run a scheduled pipeline. However, when I attempt to do this, I receive the following error: `Max number of workflows exceeded.`

Here is a simplified version of my configuration file:

```auto
version: 2.1

setup: << pipeline.parameters.run-setup >>

parameters:
  run-setup:
    description: Whether it is a setup workflow or a continuation
    type: boolean
    default: true
  force-all:
    description: Emergency valve
    type: boolean
    default: false

workflows:
  setup-workflow:
    when: << pipeline.parameters.run-setup >>
    jobs:
      - config-splitting/setup-dynamic-config:
          force-all: << pipeline.parameters.force-all >>
          base-revision: main
          modules: |
            digital-scheduling-solution/dss-submit

  check_scan:
    when:   
      and:
        - equal: [scheduled_pipeline, << pipeline.trigger_source >>]
        - equal: ["Check Scan", << pipeline.schedule.name >>]
    jobs:
      - config-splitting/scan_services:
          context: services

```

---

<div class="post-metadata">

**Author:** ![zxramozx](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/zxramozx/32/35432_2.png) [@zxramozx](https://discuss.circleci.com/u/zxramozx)\
**Post date:** [September 3, 2024, 12:11am UTC](https://discuss.circleci.com/t/issue-with-combining-scheduled-pipelines-and-setup-workflow-in-the-same-configuration/51791/2 "2024-09-03T00:11:30Z")

</div>

1. Liste ögesi
