What is the best method for having a flow kick-off...
# prefect-cloud
g
What is the best method for having a flow kick-off after every successful completion of another flow which is scheduled every 15 mins? I haven't found documentation for this but if there are docs for it that would be helpful
j
Hey! You can
run_deployment()
inside of your flow run, maybe inside of the
on_completion
hook. here is a general example for how to use run deployment. Additionally if you're using Prefect Cloud, use can use automations, where you can trigger a flow to kick off after every success.
🙌 1
g
Coming in clutch again, thank you @Jake Kaplan!
@Jake Kaplan I am trying to implement your suggestion and just need a bit more clarification; I am trying to have each of my flows in the list execute sequentially upon successful completion of the main flow. See screenshots. It looks like I need to pass in the main flow state to the start_other_flows() function somehow, can you help me understand how to do this?
j
I don't believe you need
@task
around
start_other_flows
it should just be a callable
👍 1
g
You're right, and turns out I need to pass in variables from the event hook so I changed the function to this and it worked. Thank you!
🙌 1