https://prefect.io logo
Title
g

Garret Cook

05/27/2021, 6:39 PM
I have a flow scheduled to run every 15 minutes. Occasionally the run is delayed, and in that case, I’d like Prefect to skip missed runs of this particular flow (rather than running missed runs trying to catch up). Is there a built in way to accomplish this?
k

Kevin Kho

05/27/2021, 6:49 PM
Hey @Garret Cook! Unfortunately this only exists in Prefect Cloud through Automations where you can cancel late Flow runs after a certain amount of time.
g

Garret Cook

05/27/2021, 6:50 PM
Well, I have prefect cloud, so that is an option, I suppose
Well, I have prefect cloud, so that is an option, I suppose
What about having a task that runs and checks the current time against the scheduled run time and aborts the run if > XX minutes?
Are those variables avaliable to a flow/task?
k

Kevin Kho

05/27/2021, 7:01 PM
I think you can get them through the context . If you pull the scheduled_start_time from there, you can use it.
g

Garret Cook

05/27/2021, 7:34 PM
nice, thank you for your reply
👍 1