Repository navigation
Conversation
The digest had its own cron, '0 9 * * 1', on the same minute as the daily '0 9 * * *'. Cloudflare fires only one trigger per minute, and on every Monday checked (2026-09-14 through 10-12) it was the daily one, so runWeeklyDigests never ran. It now runs from the daily trigger on Mondays, and the second trigger is gone from all four wrangler configs. Turning it on as written would have sent 64 emails a week, so before the first real send: - one email per user: several active sites get a summary table, instead of 19 separate emails to the paying customer every Monday - sites with no pageviews in either week are left out, and a user with none gets nothing - RFC 2606 reserved addresses are skipped; 36 of the 44 would-be recipients are smoke-test accounts at example.com, which would only bounce - site names, paths, referrers and insights are HTML-escaped Monday's first run should send 5 emails. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Problem
wrangler.tomlhad two crons at the same minute:0 9 * * *(alerts) and0 9 * * 1(weekly digest). Cloudflare fires only one trigger per minute. On all five Mondays checked (2026-09-14 → 10-12), Workers analytics shows only the daily one, sorunWeeklyDigestshas never run in production.Fix
0 9 * * 1trigger is removed from all four wrangler configs.Changes before the first real send
Enabling it as-is would have sent 64 emails a week:
example.com/net/org,.test,.invalid,.example,localhost). 36 of the 44 would-be recipients aresmoke…@example.comaccounts, and mailing them only produces bounces.Expected first send, Monday 2026-10-19 09:00 UTC: 5 emails. One is the paying customer's 18-site summary, one is Beam's own account, and three are free users with active sites.
Tests
test/weekly-digest.test.ts(8 tests), run on real SQL via node:sqlite.scheduled.tsfails the Monday, multi-site and escaping tests. Dropping the Monday condition fails the Tuesday test. Removing the reserved-address or zero-traffic filters fails their tests.🤖 Generated with Claude Code