cronSiteMonitor
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v2View latest version
A simple cron script that monitors website availability and sends email notifications when sites are down.
- Monitors multiple websites concurrently
- 5-second timeout for each site check
- Email notifications for downtime events
- Uses ESM modules for email functionality
- ESM email module (
https://esm.town/v/std/email
)
Fork, insert your own websites, and set a 10min cron timer.
The script considers a site as "down" if:
- The site fails to respond within 5 seconds
- The site returns a non-200 status code
- Any network or connection error occurs
When downtime is detected, an email is sent with:
- Subject: Lists all down sites with a 🚨 emoji prefix
- Body: Simple text listing of all down sites
WTFPL