Heartbeat Monitoring for Laravel

TL;DR

Laravel task scheduling and queue workers can freeze or fail completely due to memory leaks, expired API tokens, or database locks. Because these background tasks happen entirely behind the scenes, your primary Nginx or Apache server will continue running fine, leaving external uptime checkers unaware of the failure. Implementing heartbeat monitoring lets your scheduled console commands send an automated HTTP request upon successful completion, giving you instant alerts if a job fails to run.
A detailed technical infographic titled 'Heartbeat Monitoring Service' showcasing background process monitoring concepts.

Heartbeat overview

Heartbeat monitoring is a specialized but simple type of monitoring used to track the health of processes, applications, or systems by periodically sending "heartbeat" signals to a monitoring service. These signals act as a status indicator, showing that a process or application is functioning as expected. If the heartbeat fails to arrive within a predefined time frame, an alert is triggered to inform web admins of a potential issue.

Create a new Heartbeat check in Acumen Logs

Within the Acumen Logs dashboard, navigate to Heartbeat in the side navigation. Then select the create button and add an identifiable name that you can recognise later. Then press save, you will then be redirected to your Heartbeat dashboard where you will find your unique endpoint which you can then use as shown in the example below.

Let's install a Heartbeat in the Laravel scheduler

1. Open your Laravel project and navigate to the below file.

App\Console\Kernel.php

2. Then within the schedule method call the heartbeat endpoint provided to you within the Acumen Logs dashboard

   
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
   // Task a
   // Task b

   Http::post('https://acumenlogs.com/heartbeat/xxxx-xxxx-xxx-xxx-xxxx/pulse');
}


3. Run your scheduler and you will see the pulse registered in your dashboard

Key Takeaways

  • Laravel background tasks and long-running queue processes regularly encounter silent logic timeouts without disrupting public web traffic configurations.
  • Utilizing built-in framework execution hooks allows you to establish reliable background monitoring paths with zero external server dependencies.
  • Continuous verification of data pipeline schedules protects critical transactional routines like midnight billing cycles and automated cleanups from breaking unnoticed.
Get started for free

Frequently Asked Questions

How do you track failing cron jobs or background schedules in Laravel?

Up arrow icon

By appending a lightweight HTTP ping function directly to your Laravel scheduler routine. Using Laravel's native task hooks, you can chain a URL dispatch request to execute immediately after a scheduled command finishes. If the task crashes or hits a fatal error mid-execution, the finish hook never fires, causing your external monitoring dashboard to flag the missed check-in.

Acumen Logs developer dashboard panel featuring two free diagnostic tools: an SSL Checker module with a green padlock illustration and an Uptime Tester module with a glowing global network constellation graphic.
Free Tools

Quickly audit your website and infrastructure using our suite of free tools and checkers. Our lightweight set of tools allows you to scan for sudden downtime, verify certificate expiration dates, and look up domain registration details instantly without an account to protect your brand ecosystem.

Synthetic monitoring card preview

Synthetic Monitoring

Simulate real user journeys in the browser to catch broken flows, JavaScript errors, and slow pages before they impact revenue. Build and maintain journeys without code, validate key steps like logins and checkouts with screenshots, and videos when something fails.

Learn more
User journey card preview

Critical User Journey Monitoring

Track mission‑critical flows such as signup, checkout, and dashboards end‑to‑end, not just single pages. Acumen Logs surfaces failed network requests, console errors, and regressions in real time so your team can resolve UX issues quickly.

Learn more

Latest Articles

Not seeing the right fit?
Talk to us, we’ll make it work.

Start catching issues before your customers do, with real browser testing, smart alerts and AI-assisted setup.
No credit card required · Free plan available · Cancel anytime
No credit card requiredFree plan foreverCancel anytimeSet up in 60 seconds