Hi ! I’m wondering if there’s a way to run a flow ...
# ask-community
t
Hi ! I’m wondering if there’s a way to run a flow every x minutes after completion of the previous flow run (as oppose to having a fixed scheduled interval) in prefect ?
k
Hey @Tara, you can use the Flow level state handler to create a new Flow run with the Prefect Client. There is a
Client.create_flow_run
method. Check the method here . There is a
scheduled_start_time
you can pass
t
Thank you @Kevin Kho ! Is it possible to run this without the orchestration layers (i.e. not running prefect server and agent) ?
k
Yeah
Client
can be used in normal Python scripts for sure as long as you are authenticated. I think the state handler should also work with
flow.run()