Feature

A health check API for cron jobs and background workers

A health check API (also called a heartbeat endpoint) is a URL your job, worker, or service pings to prove it is alive. If the expected ping does not arrive on schedule, you get alerted. It is the simplest, most reliable way to know a background task is actually running — no agents, no SDK, just an HTTP request.

What is a health check API?

Instead of a monitor reaching into your infrastructure, you push a signal out. Each monitored task gets a unique, unguessable URL. Your code calls that URL when it finishes a successful run. The monitor knows the schedule you expect, so a missing or late ping is an immediate, unambiguous signal that something is wrong.

How Cronmint’s heartbeat endpoint works

Create a heartbeat monitor, set its expected interval, and copy its URL. Call it on success from anywhere that can make an HTTP request — a shell script, a cron line, a worker, a serverless function. A GET or POST both work.

Shell / cron
curl -fsS https://cronmint.com/ping/YOUR-TOKEN >/dev/null

From your application code

Node.js
async function pingHeartbeat() {
  try {
    await fetch('https://cronmint.com/ping/YOUR-TOKEN');
  } catch (err) {
    // never let the ping break the job
    console.error('heartbeat failed', err);
  }
}

await doTheWork();
await pingHeartbeat();

Health check vs uptime monitoring

Uptime monitoring pings your public URL from the outside to see if it responds. A health check API is the inverse: your private, non-HTTP tasks (batch jobs, queue workers, nightly scripts) report in to you. Uptime monitoring cannot see those tasks at all; a heartbeat is the only way to know they ran.

Add a health check to your job in one line

5 jobs free, no card. Set up your first monitor in about 30 seconds.

Start free

Frequently asked questions

What is a health check endpoint?

A unique URL that a job pings to signal it is alive and succeeded. If pings stop arriving on the expected schedule, the monitor alerts you.

How do I add a health check to a cron job?

Append a curl to your cron command so it pings the URL only after the job succeeds, e.g. `your-command && curl -fsS https://cronmint.com/ping/YOUR-TOKEN`.

What happens if the health check isn’t called?

Cronmint marks the job down after the expected interval passes without a ping and alerts you by email or Slack.

Is there a free health check API?

Yes — Cronmint’s free tier includes heartbeat monitors with email alerts, no credit card required.