Documentation
Scheduled email reports
Open Settings → Reports → Custom scheduled reports. A workspace owner or admin can create up to 10 reports per website. Choose daily, weekly (a weekday), or monthly (day 1), the send hour in the site's timezone, sections, up to 10 current workspace members, and an optional CSV attachment. Edit, pause, resume, delete, or send a test to yourself. Members can unsubscribe themselves on the same settings page. Removed members stop receiving; arbitrary external addresses are never accepted.
Scheduled reports are included on paid plans, active trials, complimentary plans and self-hosted installations; Free is excluded. Expired or over-quota workspaces do not send analytics. The existing personal daily/weekly digests remain separate.
Sections include overview KPIs and the preceding calendar-period comparison, top sources, pages, countries, goals/conversions, and net revenue by source. Currencies remain separate and refunds subtract from revenue. Amounts use minor units. Visitors and goal visitor counts sum daily unique visitors (visitor-days), rather than deduplicating people across days. CSV contains the tables included in the email and neutralizes spreadsheet formulas. Traffic quality remains in the dashboard because it currently requires session scans.
Delivery and catch-up
The existing five-minute cron dispatches a bounded report page at minute 55 each hour, without adding a trigger. Each invocation considers two schedules and sends at most 10 member emails per schedule, computing each report once for all its recipients. A durable cursor rotates through all schedules, including paused or locked ones. A busy installation can deliver later than the selected hour. The selected hour is the earliest eligible local time; daylight-saving skipped hours send later and repeated hours use the same period key.
Only the latest eligible completed period is sent; outages do not replay older periods. New schedules first send after their next period boundary. Reports wait until existing daily rollups cover the complete period. Early-hour reports may wait for the rollup settlement delay (at least three hours after midnight). Country exclusions cannot be applied to these rollups: such reports explain that filtered aggregates are unavailable and link to the dashboard. No raw session/event fallback occurs.
Each member delivery has a permanent, atomic schedule + period + member claim. Overlapping cron runs cannot send duplicates. A claim made before a transport timeout or worker termination is not retried, since the provider's idempotency window is finite; this favors missing an email over sending it twice. Logs record failures without email content. Test sends are a separate, atomic maximum of three attempts per site per UTC hour, only to the requesting admin. A failed or not-yet-ready test consumes an attempt.
Operator configuration and limits
Use the existing Mailer: EMAIL_DELIVERY_ENABLED=true, RESEND_API_KEY, EMAIL_FROM, and APP_ORIGIN (canonical HTTPS dashboard origin). Without the mail configuration no claims or sends occur; without APP_ORIGIN cron delivery is skipped. Apply migration 1525_scheduled_reports.sql. No new mail service or cron is required.
Report queries read only daily rollups plus a bounded payment aggregate with indexed session lookups. Tables show the top 10 rows. Each dimension reads at most 1,001 aggregate rows; payment reads across both comparison periods stop at 1,001. When a cap is exceeded, that section is explicitly omitted, never silently presented as complete. A maximal report uses at most 62 daily rows, 4,004 dimension rows and 1,001 payment rows plus point lookups and membership/entitlement reads. Exact D1 rows_read includes indexes and must be measured in production; SQLite test metadata counts returned rows only. The existing global read-budget gate also pauses cron reports and test sends near the daily account limit. Other databases on the Cloudflare account remain outside that application's accounting.
Two maximal schedules cost at most 27 SQL statements and 20 mail subrequests before shared cron metering, below the 50-query invocation limit. Claims/completions use two delivery writes per email plus cursor/index writes. Production Workers CPU time remains to be measured; local tests establish query/input bounds, not a 10 ms CPU guarantee. Delivery logs expire under workspace retention and test counters after seven days. Account export includes schedules and delivery metadata but omits other members' recipient IDs. Site deletion cascades all report tables.
Local D1 metadata measurements (Wrangler platform proxy, one recipient, all sections, a 61-day monthly comparison): 174 rows read / 13 queries with empty dimension/payment tables; 26,162 rows read / 13 queries with 1,000 rows in each of four dimensions and 1,000 payments linked to separate sessions. Both cost 5 rows written including indexes/cursor. These are fixtures, not production CPU or account-wide quota measurements.
Transport contract: Resend send email API. Database limits: Cloudflare D1 limits.