Hi everyone. I noticed one issue in scheduling beh...
# prefect-community
j
Hi everyone. I noticed one issue in scheduling behavior in registering a flow, and wondered if anyone met this issue as well. I used
CronClock("00 16 * * *",parameter_defaults=MY_PARAMETER_1)
to schedule one flow. And then I also have another flow with different batch of parameters to be scheduled at the same time,
CronClock("00 16 * * *",parameter_defaults=MY_PARAMETER_2)
. And then I set
flow.schedule=Schedule(clocks=[clock1,clock2])
, and then register the flow. In cloud UI, I just see one flow scheduled instead of two. If I tweak the time a bit, i.e., set
CronClock("05 16 * * *",parameter_defaults=MY_PARAMETER_2)
, then two flows are scheduled as expected. It seems like if two flows are scheduled at the same time, then only on will be picked. It’d better if it allows multiple flows scheduled at the same time.
n
Hi @Jie Lou, thanks for bringing this to our attention! If I understand correctly, you're passing in both of those Cron clocks to the same flow but wanting to schedule multiple runs with different parameters at different times, correct?
j
Hi @nicholas, thanks for replying! I am passing in both of those Cron clocks to the same flow but wanting to schedule multiple runs with different parameters and at the same time. That is, I hope to start two flow runs at the same time but with different parameters.
n
Great, thanks for clarifying! Sorry you're running into this, let me see if I can reproduce that behavior
j
Thanks for help! Let me know if you can reproduce it. If not, I can send a stub flow.
a
👍 1
upvote 1
n
Ok I can definitely reproduce, but this may be intentional behavior - I'm waiting for confirmation on that (and why that might be the case). In the meantime, you can get close to your intended use case by tweaking the cron string slightly
j
sounds good. Thanks!
n
Hi @Jie Lou just wanted to follow up on this to let you know I've opened a ticket to look into making this happen 😄
j
Thanks! That’d be super helpful!
😄 1