fix(pipes): run missed cron slot when app restarts late#3684
Merged
louis030195 merged 1 commit intoMay 29, 2026
Conversation
If the app was offline during a scheduled pipe run (e.g. morning-brief at 7am, app starts at 7:12am), the pipe now fires immediately on the next scheduler tick instead of silently waiting until tomorrow. Previously a hardcoded 5-minute grace window prevented any catch-up. The window is now only applied to newly-installed pipes (never run before) to prevent them from firing immediately on install.
05d6d4b to
5e31028
Compare
Contributor
Author
|
@louis030195 Can I get a review on this one ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
If a pipe was scheduled (e.g. morning-brief at 7am) but the app was offline during that window, the pipe was silently skipped and would not run until the next day. Starting the app at 7:12am meant the 7am slot was already outside the 5-minute lookback window — so it was dropped.
Fix :
The 5-minute grace window is now only applied to newly-installed pipes (no prior run history), which still need it to prevent firing immediately on install.
For previously-run pipes, the scheduler searches from the last run time directly, so any slot missed while the app was offline fires on the next tick when the app restarts.