https://prefect.io logo
#prefect-community
Title
# prefect-community
m

Miremad Aghili

11/10/2022, 2:26 PM
Hey guys, I wanted to know how I can get a flow to run on multiple schedules with different labels in prefect 1 (this is going to solve my original problem: How can I make a flow to run on every agent at the same time. so if there is a better solution please let me know.)
r

Rob Freedy

11/10/2022, 3:24 PM
Hey @Miremad Aghili!! The agent can handle multiple scheduled flow runs at the same time, as long as the agent has all of the flow's labels (see this discourse post). In terms of how to configure multiple schedules for a flow, there is a good example of adding multiple Interval clocks in the docs here. In terms of multiple agents, is there a reason you need several agents to run execute multiple flow runs of the same flow at the same time vs. having one agent kick off multiple flow runs of the same flow at the same time? (attaching a the agent overview)
🙏 1
m

Miremad Aghili

11/10/2022, 4:29 PM
yes, I have a semi distributed system and each of the systems/agents have access to a set of files so the same instance of flow needs to run on all of those agents to give me the results in a shared location
@Rob Freedy
also @Rob Freedy does the labels assigned in the schedule overwrite the labels assigned during registration of the flwo
?
r

Rob Freedy

11/11/2022, 2:53 PM
There are several ways to set labels for a flow, as shown by this discourse post. I believe the schedule label takes precedence, but I would have to double check. Is there a reason you would want to set it on both the clock and at registration? Usually setting it in one place is best practice: https://discourse.prefect.io/t/whats-the-recommended-way-to-set-labels-for-a-flow/390 Also this discourse post has a helpful pattern for you use case in order to trigger multiple of the same flows on different machine: https://discourse.prefect.io/t/can-i-run-a-flow-of-flows-that-triggers-each-child-flow-on-a-different-machine/180
4 Views