Public
Cron uptime check that emails you on down/recovered
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.
This val checks your website every 5 minutes and emails you (via Val Town's built-in std/email, to your account email) only when the status changes: one email when the site goes down, one when it recovers. The last known status is stored in blob storage, so you never get repeat alerts while the site stays down.
- Remix this val.
- In
monitor.ts, changeURL_TO_MONITORto your website's URL. - That's it. The first run records a baseline; after that you get an email on every down/recovered transition.
No API keys or environment variables needed. To test it, point URL_TO_MONITOR at a URL that 404s and run monitor.ts manually.