Most tiny SaaS apps have a handful of jobs that run on a timer and nobody watches. A nightly database backup. A job that sends trial-ending emails. A sync that pulls subscription state from Stripe so your own table doesn't drift. Something that cleans up expired sessions or old uploads. Maybe a weekly digest.
Your uptime monitor checks that the homepage returns 200. It has no idea whether any of those ran last night. The site is up, the dashboard is green, and the backup job could have been failing since a dependency update nine days ago. You find out the day you need the backup.
The fix is small and boring: a heartbeat for each job. The job pings a URL when it finishes, and if the ping doesn't arrive on time, you get an alert. It's sometimes called a dead man's switch. Here's how I'd set it up when you have under 100 users and one person on call (you).
I'll use Healthchecks.io's pinging API for the examples because the docs are clear and the free Hobbyist plan covers 20 jobs, which is more than a tiny app needs. Cronitor, Better Stack and Sentry Crons do the same basic thing. The pattern matters more than the tool.
1. Write down every job first
Before any tooling, make a list. For each job, one line:
| Job | Schedule | Where it runs | What breaks if it stops |
|---|---|---|---|
| DB backup | daily 02:00 | VPS crontab | you can't restore |
| Trial-ending emails | hourly | worker | people get charged with no warning |
| Stripe reconcile | daily 03:00 | worker | access drifts from billing |
| Session cleanup | daily | Vercel cron | table grows, slowly |
| Weekly digest | Mon 08:00 | GitHub Actions | nobody notices for a while |
The last column decides how loud the alert should be. A missed backup or a missed billing job should reach your phone. Session cleanup can be an email you read tomorrow.
Doing this list is usually where you find a job you forgot existed, or one that lives on a platform you stopped thinking about.
2. One check per job, matched to the schedule
Create one check per job. Don't share a check between two jobs, or one of them can die while the other keeps it green.
For the schedule you have two options:
- Period + grace. "Expect a ping every 24 hours, wait 1 extra hour before alerting." Simple, and fine for most jobs.
- Cron expression + timezone. Paste the same expression as your crontab and set the server's timezone. Healthchecks.io then checks the job ran at the right time, not just at roughly the right interval. If your server isn't on UTC, the timezone field matters, because cron uses the machine's local time.
Grace time is the setting people get wrong. Too short and every slow night pages you. Too long and you hear about a failure half a day late. I'd start with roughly the job's normal run time plus a margin, then tighten it after a couple of weeks of real data.
3. Ping on success, and ping failure explicitly
The basic version is one line at the end of the job:
curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/your-uuid-here
-m 10 stops the ping from hanging your job, --retry 5 retries on timeouts and transient server errors, and -fsS keeps it quiet unless something goes wrong.
That alone catches the job not running at all. To find out sooner when it runs and fails, send the exit code. Healthchecks.io treats /0 as success and any other number as a failure:
#!/bin/bash
set -o pipefail
pg_dump -Fc mydb | gzip > /backups/mydb-$(date +%F).dump.gz
curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/your-uuid-here/$?
The set -o pipefail line is the one that bites. Without it, a pipeline's exit code is the last command's. So if pg_dump fails but gzip happily compresses nothing, the script reports 0 and your heartbeat says the backup worked. That's an empty file with a green check next to it.
In app code it's the same idea:
import requests
URL = "https://hc-ping.com/your-uuid-here"
ok = False
try:
ok = run_trial_reminders() # return True only if it actually did the work
finally:
requests.get(URL if ok else URL + "/fail", timeout=10)
4. Add /start to catch hung jobs
A job that hangs is worse than one that crashes, because it never reaches the line that reports failure. Ping /start when the job begins:
curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/your-uuid-here/start
If a start arrives and no success follows within the grace time, the check goes down and you get alerted. You also get run durations for free, which is how you'd notice a backup that used to take 4 minutes now takes 40.
If the same job can overlap with itself, pass a run ID (?rid=<uuid>) on both pings so durations don't get mixed up.
5. "It ran" is not "it worked"
The quiet failure is a job that runs on time, exits 0 and does nothing. The reconcile job that fetched zero subscriptions because the API key got rotated. The email job that found zero trials ending because a query filter broke.
Two cheap ways to catch that:
-
Send a number in the ping body. Healthchecks.io stores the first 100 kB of a POST body, so post something like
checked=37 updated=2. When something looks off, the history is right there. -
Fail on "suspiciously zero". If the reconcile job normally touches 30+ customers and today it saw 0, ping
/failinstead of success. You'll get the odd false alarm on a quiet day. That's cheaper than a week of drift.
For backups, the heartbeat proves the dump ran. It doesn't prove you can restore it. I wrote up a monthly restore drill for a solo SaaS for that part.
6. Platform crons have their own catches
If your jobs don't live in a crontab, read the small print. A few I'd check:
-
Vercel cron jobs are best effort. Vercel's docs say it won't retry a failed invocation, and occasionally a request may not reach your function at all, with no runtime log for that run. On the Hobby plan, crons are limited to once a day and a
0 1 * * *job can fire anywhere between 1:00 and 1:59. Vercel also says a long job can overlap with the next run, and recommends locks plus idempotent jobs so a duplicate or missed run is safe. - GitHub Actions schedules can be delayed at busy times, especially the top of the hour, and under heavy load some queued runs can be dropped. In a public repo, scheduled workflows are disabled automatically after 60 days with no repository activity. A weekly digest living in a quiet repo will simply stop one day.
-
Your own VPS crontab only "alerts" by emailing job output, which needs
MAILTOand a working mail setup. On a lot of servers that was never configured, so the output just goes nowhere.
A heartbeat covers all three the same way: if the ping doesn't show up, you hear about it. For Vercel and GitHub Actions, schedule a few minutes off the hour and set the grace time to cover the platform's timing window.
7. Send alerts where you'll actually see them
Pick two levels and stop there:
- Wake me up: backup, billing-related jobs, anything where a missed run costs money or data. Phone push or a chat app with notifications on.
- Tell me today: cleanup, digests, nice-to-haves. Email is fine.
Then test it. Pause a job or point its ping at /fail once, and confirm the alert actually reaches you. An alert channel you've never seen fire is the same as no alert channel.
This fits into a bigger question of what to watch on a small app when you can't stare at dashboards all day. The SideHunt guide on monitoring a side project during your day job covers uptime checks, error alerts and alert tiers around it, so I won't repeat it here.
The 20-minute version
If you only do the minimum today:
- List your scheduled jobs and where each one runs.
- Create one check per job, with a grace time that matches how long it normally takes.
- Add the exit-code ping at the end, with
set -o pipefailin shell scripts. - Force one failure and make sure the alert reaches your phone.
That's it. Don't be surprised if the first alert is for a job you'd forgotten about.
How many scheduled jobs does your app run right now, and do you know for sure that each one ran last night?
Top comments (3)
The Stripe reconcile row in your table is the one that bites hardest. When that sync dies quietly, access drifts from billing in both directions: customers who paid but stay blocked, and cancelled accounts that keep feature flags on. Nobody opens a ticket about it for weeks because both sides look plausible from inside the app. The 'fail on suspiciously zero' check is the right instinct for exactly that job, a reconcile that touches zero customers is never a normal day. One addition worth the two minutes: give the billing jobs their own alert channel from the backup jobs, so a payment-side failure doesn't get normalized the way infra noise does.
yeah, both directions looking plausible is what makes it slow to notice. nobody complains about having features they didn't pay for. a separate alert channel for billing makes a lot of sense. do you send only failures there, or also a daily 'reconcile touched N customers' line?
Failures page you, the daily line keeps you honest. A failures-only billing channel rots in exactly the way this whole post is about: if the reconcile job silently stops running, the alert channel never fires and the absence of alerts reads as health. A one-line 'reconcile touched N customers, M corrections' heartbeat through the same channel turns silence itself into the signal, and M is often the more interesting number, since a spike in corrections usually means something upstream changed and nobody told you.