Hello, I am new to Prefect, I have a basic scenari...
# ask-community
i
Hello, I am new to Prefect, I have a basic scenario: I am running a flow on schedule, if the job is still running and the next schedule arrived (the older still running), I want to skip the next instance with success and log:old job is still running. (i don't want it to wait, just skip the next schedule. usually, we do it with ETL and create a file or save the PID of the current job run and when the next fire up it checks if the file exists or PID, if it exists we finish the etl job with success and an email ("already running") is there a better way in Prefect? thanks
k
Hey @itamar, you would have to query the GraphQL API with the flow id and see if there's any flow runs in a running state. This would be the first task in your flow.