Long Running Task Monitoring

Monitoring your workers, queues and background jobs.

Long-running tasks like queue workers require special monitoring.

MoniTao Heartbeat with start/ping endpoints allows measuring execution time of your jobs.

What tasks to monitor?

Heartbeat is suitable for monitoring tasks running in the background:

  • Queue workers (Laravel, Symfony, Sidekiq...)
  • Long-duration batch processing
  • Report generation
  • Machine learning tasks

The /start endpoint

For long tasks, use /start at the beginning and /ping at the end to measure duration:

# Signal debut de tache longue
curl -X POST https://monitao.com/api/heartbeat/start/YOUR_TOKEN \
  -H "Authorization: Bearer YOUR_SECRET"

# ... execution de la tache ...

# Signal fin de tache
curl -X POST https://monitao.com/api/heartbeat/ping/YOUR_TOKEN \
  -H "Authorization: Bearer YOUR_SECRET"

Timeout detection

If a task starts but never ends (stuck), MoniTao will detect it and alert you.

Use Cases

  • Email queue worker monitoring
  • PDF generation job monitoring
  • Mass data processing supervision

Configuration

  1. Create a heartbeat job with expected interval
  2. Call /start at job beginning
  3. Call /ping or /fail at end based on result

Frequently Asked Questions

How to monitor a continuously running worker?

Configure a regular ping (e.g., every 5 minutes) to prove the worker is active.

Can I be alerted if a job takes too long?

Alerts on excessive duration are planned for a future version.

How to handle jobs that can legitimately take more or less time?

Configure a sufficient grace period to cover normal variations.

Is heartbeat suitable for microservices?

Yes, each microservice can have its own heartbeat job for fine-grained monitoring.

Ready to Sleep Soundly?

Start free, no credit card required.