Loading...
BetterStack Environment Variables - Added BETTERSTACK_HEARTBEAT_DAILY_MAINTENANCE and BETTERSTACK_HEARTBEAT_WEEKLY_TASKS to server environment schema with Zod urlString validation
Success-Only Heartbeat Pattern - Implemented non-blocking heartbeat pings that only fire when all cron tasks complete successfully (failedTasks === 0)
Graceful Error Handling - Heartbeat failures logged as warnings but don't break cron execution, with 5-second timeout for reliability
Security-First Implementation - Lazy imports to avoid circular dependencies, server-only execution, no secrets in repository
TL;DR: Implemented secure BetterStack heartbeat monitoring for Vercel cron jobs to automatically detect failures and send alerts when scheduled tasks don't complete successfully. Uses success-only reporting pattern with environment variable configuration for open-source security.
Added BetterStack heartbeat monitoring integration to both Vercel cron jobs (daily maintenance and weekly tasks) following open-source security best practices. Heartbeat URLs are stored as environment variables and only sent on successful task completion. BetterStack automatically alerts when expected heartbeats don't arrive, providing reliable uptime monitoring for critical scheduled operations.
BETTERSTACK_HEARTBEAT_DAILY_MAINTENANCE and BETTERSTACK_HEARTBEAT_WEEKLY_TASKS to server environment schema with Zod urlString validation