Repository navigation
fix(app): only call a cron every N hours when it covers the whole day - #66900
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
The fix works and looks sound. I ran triggerLabel on the base and on this branch over a set of crons. 0 9-17 * * * and 0 0-12/6 * * * now keep their cron text, and 0 0-23 * * * reads "Every hour at :00" instead of "Every 1 hours". Whole-day schedules still get the friendly label, including offset ones like 30 3/6 * * * and lists like 0 18,0,6,12 * * *, because hours.length * step === 24 together with the even-spacing check means the wrap-around gap matches the step. tsc -b in packages/app passes. The public API is unchanged. No concerns.
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.
follow-up to #66899 from the bot review:
0 9-17 * * *was labelled "every 1 hours" and0 0-12/6 * * *"every 6 hours". now the hours have to span the whole day, otherwise it keeps the cron text, and a step of 1 reads as the hourly label