Skip to content

fix(app): only call a cron every N hours when it covers the whole day - #66900

Merged
thdxr merged 1 commit into
devfrom
fix-cron-hours
Nov 27, 2026
Merged

thdxr merged 1 commit into
devfrom
fix-cron-hours

Conversation

@thdxr

@thdxr thdxr commented Nov 27, 2026

Copy link
Copy Markdown
Member

follow-up to #66899 from the bot review: 0 9-17 * * * was labelled "every 1 hours" and 0 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

@thdxr
thdxr merged commit 5410c21 into dev Nov 27, 2026
11 checks passed
@thdxr
thdxr deleted the fix-cron-hours branch November 27, 2026 23:35

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant