Fix role-pipeline-report posting daily instead of monthly - #485
Closed
jcklpe wants to merge 1 commit into
Closed
Conversation
The schedule '0 10 1-7 * 1' mixed a day-of-month restriction (1-7) with a day-of-week restriction (1/Monday). Standard cron treats mixed day-of-month + day-of-week fields as OR, not AND, so this fired on every day 1-7 of the month AND every Monday instead of only the first Monday. Confirmed against run history: it posted to #t-engagement daily July 1-7 plus June 15/22/29. Switch to a plain weekly Monday cron and gate the actual report step on day-of-month <= 7 in the job itself, since cron can't express "first Monday of month" directly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
Author
|
Closing — folding this fix back into a regular working-tree change instead of a branch/PR, per repo owner preference. |
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.
Summary
'0 10 1-7 * 1'mixed a day-of-month restriction (1-7) with a day-of-week restriction (1/Monday), intending "first Monday of the month." Cron treats mixed day-of-month + day-of-week fields as OR, not AND, so it fired on every day 1-7 of the month and every Monday.#t-engagementdaily July 1-7, plus June 15/22/29 (all Mondays) — this is the spam that got it disabled.0 10 * * 1cron, with a guard step that skips the actual report job unless day-of-month ≤ 7 (the standard idiom since cron can't express "Nth weekday of month" directly).Test plan
workflow_dispatchand confirm the guard step correctly skips/runs depending on today's date