Cron job monitoring, for the job that just stops
A website can be up while the cron is dead. The backup didn't run, the invoice job didn't run, and nobody writes to you because the homepage still loads. A heartbeat is how you hear about that.
Included on the free plan. One site, no card.
How a heartbeat works
You add a cron / heartbeat monitor and Greenbar gives you a URL. The job calls that URL at the end of a successful run. POST only, so a link preview doesn't count as a run. If the ping doesn't show up inside the window you set, the monitor goes down and you get an alert.
You pick how often the job should check in, and a grace period on top. The form starts the grace at 5 minutes, and you can change it. During the grace the job is late. After the interval plus the grace, it's down. One missed window opens the incident. One ping closes it. (A website check is stricter in the other direction: two failures in a row, then two good checks.)
The call, once you have the URL
curl -fsS -m 10 --retry 3 -X POST https://usegreenbar.com/api/heartbeat/YOUR_TOKEN
YOUR_TOKEN stands in for the real one. Greenbar shows the URL once, when you create the monitor. If you lose it, you rotate it from the monitor page. Don't paste a real token into a public README.
In a crontab, after the job succeeds
*/5 * * * * /path/to/job.sh && curl -fsS -m 10 --retry 3 -X POST https://usegreenbar.com/api/heartbeat/YOUR_TOKEN
It's on the free plan
- Free is one site, up to 5 monitors, and it doesn't expire. A heartbeat counts as one of those monitors.
- On Free the soonest a monitor can expect a ping is every 5 minutes. A nightly backup is fine. A job that must run every minute needs a paid plan.
- Freelancer ($15/mo) and Agency ($35/mo) can expect a ping every 30 seconds.
- Free alerts by email. Paid plans can also use Slack, a signed webhook, Discord, Microsoft Teams, Telegram, Google Chat, Mattermost, PagerDuty or Pushover.
A new heartbeat stays off the public status page, because a lot of these jobs are internal. You can show it later if you want clients to see that the job is healthy.
What this is not
Greenbar doesn't run the job for you, and it doesn't log in to the server. The job has to be able to reach the ping URL. There's no ping monitor, no check from several regions, and no phone call. If the cron host itself is down, you want a separate check on that host.
FAQ
Do I need a paid plan to watch a cron job?
No. Heartbeats are on the free plan, which is one site and doesn't ask for a card. The tightest schedule on Free is every 5 minutes. Paid plans can go to every 30 seconds.
What counts as down?
You set the expected interval and a grace period. The form starts grace at 5 minutes. If no ping arrives before the interval plus the grace, that window is missed, and one missed window opens the incident. The next successful ping closes it.
Will my clients see the cron on the status page?
Not unless you turn that on. A new heartbeat starts hidden. Website monitors are different: those show on the page unless you hide them.