Skip to main content
By the end of this guide, you’ll have heartbeat monitors tracking your scheduled jobs, with alerts firing when a job stops running on schedule.
  • DevHelm CLI installed or an API token
  • One or more cron jobs or scheduled tasks to monitor

The heartbeat pattern

Standard monitors work by checking your service outbound. For cron jobs, the pattern is reversed — your job pings DevHelm after each successful run. If DevHelm doesn’t receive a ping within the expected window, it opens an incident.

Set up a heartbeat monitor

1

Create the monitor

The CLI creates heartbeat monitors with a 60-second expected interval and grace period. For a daily job like this one, set expectedInterval and gracePeriod via YAML config-as-code (shown above) or the API.
2

Get the ping URL

Copy the pingUrl from the response.
3

Add the ping to your job

Add a curl at the end of your script:
Using curl -fsS ensures the ping is only sent on HTTP success. If the script fails (set -e), the curl never runs and DevHelm eventually alerts.

Common intervals

Advanced patterns

Add a post-completion container or use a completions-based Job with a sidecar:
For workers that process queues continuously, add a periodic heartbeat in the main loop:
Define all heartbeat monitors in a single YAML file:
Always use set -e or equivalent error handling so the ping is skipped when the job fails. This way DevHelm catches both “job didn’t run” and “job ran but failed” scenarios.

Next steps

Heartbeat reference

Full heartbeat configuration and assertions.

First alert

Get notified when a heartbeat goes silent.

Monitoring as Code

Manage all heartbeat monitors in YAML.