Hi all, I am a bit unsure of how should I deal wit...
# ask-community
m
Hi all, I am a bit unsure of how should I deal with Late Runs (eg when my agent was down for some time and now just deploying flow runs one after another to catch up ignoring schedule). It is a test scenario and tasks are small and don't change target state, but in real world I usually don't want to "catch up" - in ETL use case if I missed 5 hourly jobs, I would process those 5 hours of data at once rather than sending 5 separate jobs for execution. Should I design flows which take care of this logic (eg it will still be 5 jobs, but last 4 will do nothing since I'll have checks in place) or there is another way to achieve this?
z
Hi @Maria, this is indeed a tricky case. Perhaps each flow you schedule should check for "results" of their previous jobs and change the scope of work they should do accordingly. The first task of a flow could check if they are "late" by a certain amount of time and raise a "SKIP" if they are so that the data can be processed by the "on time" flow.
m
Thanks @Zanie, is there a way to cancel scheduled runs and avoid late runs in the cloud UI? Even when I disable schedule, those pre-scheduled tasks still get executed ...
z
When you disable the schedule, future auto-scheduled flow runs should be cancelled or deleted.
Can you explain what you're seeing a bit more?
m
This is what I was struggling with yesterday and today with those "late runs" still being executed even when schedule was disabled - but I have tried to reproduce this behavior now to get screenshots and couldn't. I will keep an eye on it and take screenshots / post here if I see it again. Thanks.
z
Wonderful, thanks! We've recently released some optimizations for this so hopefully it doesn't happen again