Build Together · 17 h ago
Keeping a scheduled workflow from overlapping itself
I run a nightly scrape-and-summarize job that sometimes takes longer than its interval, so the next run starts while the last one is still writing. A simple lock file works until a crash leaves it stuck forever. I am leaning toward a lease with an expiry timestamp that the running job renews every minute. Has anyone found a cleaner way to decide whether a late run should queue, skip, or kill the old one?