Heartbeat: Scheduled Task Monitoring

Make sure your crons and scripts run correctly.

Heartbeat monitoring allows you to monitor tasks that should run at regular intervals.

Your script sends a ping to MoniTao after each successful run. No ping = alert.

Operating principle

Heartbeat works on a simple principle:

  1. You create a job with an expected interval (e.g., every 24h)
  2. Your script calls our API at the end of each execution
  3. If the call doesn't arrive on time, you are alerted

API Endpoints

Three endpoints available for different cases:

  • POST /api/heartbeat/start/{ping_token} - /start - Signals the start of a task
  • POST /api/heartbeat/ping/{ping_token} - /ping - Signals successful completion
  • POST /api/heartbeat/fail/{ping_token} - /fail - Signals a failure

Included features

Grace period

Configure a grace period to account for variations in execution time. The alert is only sent after this period has elapsed.

Use Cases

  • Backup cron monitoring
  • Data import monitoring
  • Queue job verification

Configuration

  1. Create a heartbeat job in MoniTao
  2. Copy the provided ping URL
  3. Add a curl at the end of your script

Frequently Asked Questions

What's the difference between start, ping and fail?

Start signals the beginning, ping signals successful completion, fail signals explicit failure.

What happens if my job is late?

After the configured grace period, an alert is sent.

Can I monitor hourly jobs?

Yes, the interval is configurable from 1 minute to several days.

Does heartbeat work with all languages?

Yes, any language capable of making HTTP requests can use heartbeat.

Ready to Sleep Soundly?

Start free, no credit card required.