Skip to content

Fix role-pipeline-report posting daily instead of monthly - #485

Closed
jcklpe wants to merge 1 commit into
mainfrom
fix/role-pipeline-report-cron
Closed

Fix role-pipeline-report posting daily instead of monthly#485
jcklpe wants to merge 1 commit into
mainfrom
fix/role-pipeline-report-cron

Conversation

@jcklpe

@jcklpe jcklpe commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • The schedule '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.
  • Confirmed against run history: it posted to #t-engagement daily July 1-7, plus June 15/22/29 (all Mondays) — this is the spam that got it disabled.
  • Fix: plain weekly 0 10 * * 1 cron, 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

  • Confirm workflow is re-enabled in GitHub Actions if it was disabled
  • Trigger manually via workflow_dispatch and confirm the guard step correctly skips/runs depending on today's date
  • Watch the next two Mondays: expect a post only on the one that falls within day-of-month 1-7

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>
@jcklpe

jcklpe commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Closing — folding this fix back into a regular working-tree change instead of a branch/PR, per repo owner preference.

@jcklpe jcklpe closed this Jul 8, 2026
@jcklpe
jcklpe deleted the fix/role-pipeline-report-cron branch July 8, 2026 03:14
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