What is Heartbeat Monitoring?
Heartbeat monitoring is a way of confirming that something expected did in fact happen.
When used with Laravel’s scheduler, it works like this:
- You schedule your job.
- At the end of the job, you make a simple HTTP request (a “heartbeat”) to an external monitoring service.
- If that HTTP request doesn’t come in within a defined window, you get alerted.
It’s simple, but incredibly effective.
When Should You Use Heartbeats?
You should monitor any job that:
- Is business-critical (e.g., sending invoices, billing customers)
- Runs infrequently (and might be forgotten)
- Has dependencies on third-party APIs
- Is expected to complete within a specific time frame
How to Add Heartbeat Monitoring to Laravel Jobs
Here’s how you can implement a basic heartbeat check using Guzzle or Laravel’s HTTP client.
use Illuminate\Support\Facades\Http;
$schedule->command('send:invoices')
->daily()
->after(function () {
Http::get('https://acumenlogs.com/heartbeat/abc123'); // Replace with your real heartbeat URL
});
Or you can put the call at the end of your job’s handle()
method if it’s a queued job:
public function handle()
{
// ... your logic ...
Http::get('https://acumenlogs.com/heartbeat/abc123');
}
Now, if that job fails to run or never finishes, you’ll be notified within minutes.
Monitoring Laravel Cron Jobs with Acumen Logs
We make heartbeat monitoring effortless for Laravel devs:
✅ Create a unique heartbeat URL in seconds
✅ Set frequency expectations (e.g., every day, every hour)
✅ Get alerted if a job doesn’t check in on time
✅ View missed pings, success history, and latency
You can monitor hundreds of scheduled jobs with confidence — without building your own notification system.
Final Thoughts
Don’t wait for your customers or coworkers to tell you something didn’t run.
Monitoring Laravel’s scheduled jobs is one of the easiest ways to increase stability, catch silent failures, and gain peace of mind.
If you rely on cron jobs, it’s time to monitor them properly.
You already wrote the code — now make sure it runs.