Ben
11/27/2025, 8:04 AMprefect.yaml file to define multiple deployments that each execute this flow with different parameters. E.g.
deployments:
- name: 'My flow (foo)'
entrypoint: src/flows.py:my_flow
parameters:
data: foo
work_pool:
name: default
work_queue_name: default
version:
concurrency_limit:
schedules:
- cron: 0 11,23 * * *
timezone:
day_or: true
active: true
- name: 'My flow (bar)'
entrypoint: src/flows.py:my_flow
parameters:
data: bar
work_pool:
name: default
work_queue_name: default
version:
concurrency_limit:
schedules:
- cron: 0 10,22 * * *
timezone:
day_or: true
active: true
As you can see, I have copy and pasted the deployment config 2 times and only changed the parameter and cron schedule. Instead of copying and pasting this deployment config multiple times, is there a way to define 1 dynamic deployment that can have have different params and different cron schedules?Marvin
11/27/2025, 8:04 AMMarvin
11/27/2025, 8:06 AMparameters and cron.
Here’s your example rewritten as one deployment with two schedules, each overriding the data parameter and using its own cron:
deployments:
- name: "My flow"
entrypoint: src/flows.py:my_flow
# Optional defaults applied when a schedule doesn't override
parameters:
data: null
work_pool:
name: default
work_queue_name: default
version:
concurrency_limit:
schedules:
- slug: "foo-schedule"
cron: "0 11,23 * * *"
day_or: true
active: true
parameters:
data: foo
- slug: "bar-schedule"
cron: "0 10,22 * * *"
day_or: true
active: true
parameters:
data: bar
Notes:
- The parameters under each schedule override the deployment-level parameters for runs triggered by that schedule.
- slug is optional but helpful for identifying schedules later.
- Keep separate deployments only if you also need different work pools/queues, infra, tags, etc. If it’s just params and timing, multiple schedules in one deployment is the simplest option.
If you’d like, I can also show a variant with YAML anchors to DRY up shared fields.