Cron job monitoring
Cron job monitoringfor the jobs that fail without a sound.
A backup that stops running tells nobody. A heartbeat node turns that round: your job calls an address each time it finishes, and if the call does not come, the right person hears.
How it works
One line at the end of your job
Add a heartbeat node and you get an address. Call it from the last line of your script with curl, or from your code with any HTTP request.
Say how often the call should come. If that time passes in silence, the node goes down and the alert goes out.
- An address of its own for each job
- GET or POST, either works
- Expect a call every 5 minutes up to every day
- No agent to install
- Works from any language or scheduler
- Database backups
- Cron jobs and scheduled tasks
- Data imports and exports
- Batch and billing runs
- Workers that should check in
What it is for
Anything that runs on a timer
Nightly backups, invoice runs, data imports, report emails, certificate renewals, queue workers that should check in.
If the job crashes, hangs, or the server it lives on is switched off, the call does not arrive and you find out the same day, not at month end.
The alert
Silence reaches a person
Heartbeat alerts go where the rest of your alerts go: Slack, Discord, a webhook, PagerDuty, a text, an email or your own API.
When the job calls in again the node comes back up, and everyone is told.
- Every kind of alert route
- Alert groups by day and time
- Shows when the last call came
- A message when it is back
- On every plan, Basic included
Questions
How does a heartbeat check work?
Your job calls an address when it finishes. Know It Broke expects that call on a timetable you set. If the call does not come in time, the node goes down and you are told.
What do I add to my cron job?
One HTTP call at the end, for example a curl to the address the node gives you.
Which plans include heartbeat nodes?
All three. A heartbeat counts as one node, and Basic holds 10.
Can it tell me the job ran but failed?
Call the address only when the job succeeds. A job that fails then stays silent, and silence raises the alarm.
Also in every account