If I have multiple clocks for a flow’s schedule th...
# ask-community
j
If I have multiple clocks for a flow’s schedule that all trigger at the same time, only 10 flows runs are scheduled. I also only see 10 upcoming runs when I view the flow in the UI. If I want more than 10 flow runs for the same flow to start at around the same time, how do I do this? I don’t have any concurrency limits on my flows or tasks (unlimited for both).
k
Are you on Prefect Server or Cloud?
j
prefect cloud
I have a flow with a schedule with 13 clocks each with their own set of parameters that runs every night. Only 10 are ever scheduled and run
k
Ok I will check the team on this
Hey Josh, I checked with the team and unfortunately, 10 is really the limit in Cloud so you’ll need to split that Flow
a
as an alternative, you could build a parent flow that triggers additional runs (on top of those 10 scheduled ones) via
create_flow_run
task
upvote 1
j
@Kevin Kho what fidelity can I schedule upcoming runs for in the cloud? I assume at some extreme, if I had a schedule of 13 clocks each set to run 1 day apart, [day 1, day 2, day 3 etc] that over the course of two weeks, all 13 clocks would trigger? Is the limit 10 scheduled flows at the same time and then 1 minute from then the other clocks will be triggered?
k
So we have a service called Towel. In
towel
, there is a scheduler service. The scheduler will schedule a maximum of 10 runs. The loop of this is 150 seconds: https://github.com/PrefectHQ/server/blob/master/src/prefect_server/services/towel/scheduler.py#L19
So if you have 10 daily, yes it will schedule. 1 minute might be a bit too tight for the same Flow
j
got it. Thanks for the info
Are there any plans to increase the maximum number of scheduled runs and reduce the loop time? If we want to schedule multiple things or fire off jobs ad-hoc, this is a pretty restrictive limitation.
k
No because the increase in system wide unfortunately. So to increase a user’s limit to scheduled runs, it means that we schedule the next 20 flows for all registered flows across all users
j
So I wouldn’t really be able to use Prefect as a task queue to schedule a burst of flow-runs with different parameters then?
k
I think current Prefect is not good as a task queue in that sense, but I think if you are hitting the API and creating Flow runs (or doing quick runs), this will work. This global variable is in relation to how many future runs are being created from the schedule
Because those runs are created and inserted in the database as opposed to being created by the background service