Hi everyone, We are conducting a POC to migrate o...
# ask-community
s
Hi everyone, We are conducting a POC to migrate our batches to Prefect. While working on this, we have a few questions related to our use case. We are not using Prefect Cloud but are integrating our flows to run from an AWS ECS cluster. Our integration setup is ready, and we are considering using the run_deployment() method. We plan to have a single deployment linked to a flow that accepts different arguments. Based on these arguments, we will trigger the same deployment multiple times with different parameters to run various batches. Essentially, our flow will act as a generic template, processing data dynamically based on the provided parameters. Our key questions: How can we schedule a single deployment to run at different times with different arguments when using run_deployment()? What are the best practices to follow when using run_deployment() in this manner? Looking forward to your insights!
b
How can we schedule a single deployment to run at different times with different arguments when using run_deployment()?
Hey Srinivas! There's a parameter called
scheduled_time
that you can pass to run_deployment to schedule the start time of the run. You can use this in tandem with custom
parameters
to run the deployment multiple times with different start times and inputs.
s
Thanks for the response Bianca. This helped!
Hi @Bianca Hoch, We are testing run_deployment() and have a question regarding the scheduled_time parameter. If we run a deployment at 12 AM, and the scheduled_time is 1 AM, we understand that the deployment will be scheduled for 1 AM. However, if we run a deployment at 1 AM, but the scheduled_time is set to 12 AM (past time), how will Prefect handle it? Could you please provide more details on how scheduled_time works within run_deployment() and its behavior in different scenarios? Looking forward to your insights.
@Bianca Hoch Can you be able to please respond on the above?