internal

Daily sweep: send quota-80/quota-100 emails when MTD usage crosses thresholds

Daily cron scanning month-to-date daily_usage per active org.

Thresholds: quota-100 at ratio >= 1.0, quota-80 at ratio >= 0.8. Fires for all tiers. Period-scoped org_email_log keys make each 80% and 100% notice a once-per-billing-month action.

Month boundaries read from _mtd_bounds; daily_usage lag is ~1 day because daily-usage-snapshot writes yesterday's bucket at 00:05 UTC and this cron fires at 00:15 UTC. Today's usage will not appear until tomorrow's snapshot, which is fine — a customer crossing 80% on day N gets the email on day N+1 at worst.

post/internal/cron/quota-warnings

Headers

x-internal-secretstring nullable

Response

Successful Response

object required