Uptime Monitoring as a Service: NestJS Cron Jobs, Twilio Alerts, and Status Pages
How to build an uptime monitoring SaaS using NestJS scheduled tasks, Redis for fast polling, and Twilio/SendGrid for multi-channel downtime alerts.
Uptime Monitoring as a Service: NestJS Cron Jobs, Twilio Alerts, and Status Pages
Every minute of downtime costs money. SiteGuard checks endpoints every 60 seconds and alerts teams before customers notice.
1. NestJS Scheduled Monitoring
The scheduler runs parallel HTTP probes against all monitored endpoints:
typescript@Injectable() export class MonitorService { @Cron(CronExpression.EVERY_MINUTE) async checkEndpoints() { const endpoints = await this.redis.smembers('monitored_urls'); const results = await Promise.allSettled( endpoints.map(url => this.httpService.get(url, { timeout: 10000 }).toPromise()) ); results.forEach((result, i) => { if (result.status === 'rejected') this.alertService.triggerAlert(endpoints[i]); }); } }
2. Multi-Channel Alerts
When downtime is detected, alerts fire simultaneously via Twilio SMS, Slack webhooks, and SendGrid email — ensuring someone always gets notified.
3. Public Status Pages
Each customer gets a branded status page showing uptime history, response times, and incident reports.
Summary
Scheduled probes + multi-channel alerts + public status pages create a monitoring service that catches downtime within 60 seconds.