Billing Usage Check Edge Function
Scheduled cron job that checks container usage against plan limits and takes appropriate action (auto-upgrade or pause) when limits are exceeded.
POST /billing-usage-check
Required - x-cron-secret header with CRON_SECRET
This function runs on a schedule and:
Usage thresholds:
= 100%: Auto-upgrade or pause
Tables touched:
External services:
200 - Summary with checked, auto_upgraded, paused, warnings counts
401 - Invalid or missing cron secret
500 - Configuration or database error
Fileoverview
Billing Usage Check Edge Function
Scheduled cron job that checks container usage against plan limits and takes appropriate action (auto-upgrade or pause) when limits are exceeded.
Endpoint
POST /billing-usage-check
Auth
Required - x-cron-secret header with CRON_SECRET
Remarks
This function runs on a schedule and:
Usage thresholds:
Tables touched:
External services:
Returns
200 - Summary with checked, auto_upgraded, paused, warnings counts
Returns
401 - Invalid or missing cron secret
Returns
500 - Configuration or database error