AlertKite
← AlertKite

Monitor Laravel's scheduler and know when it stops

Laravel's entire scheduler hangs off a single cron line calling schedule:run every minute. If that line is missing after a server migration, or the deploy user changed, every scheduled task in your application stops at once — queued emails, cleanups, report generation, subscription renewals.

Nothing throws. The application works perfectly. It simply stops doing anything on a schedule.

routes/console.php (Laravel 11+) or app/Console/Kernel.php

Schedule::call(function () {
    Http::timeout(10)->get('https://hb.alertkite.com/p/YOUR_TOKEN');
})->hourly();

// Or attach it to a specific task you care about:
Schedule::command('backup:run')
    ->daily()
    ->onSuccess(fn () => Http::timeout(10)->get('https://hb.alertkite.com/p/YOUR_TOKEN'))
    ->onFailure(fn () => Http::timeout(10)->get('https://hb.alertkite.com/p/YOUR_TOKEN/fail'));

Setting it up

  1. Create a heartbeat monitor and copy its ping URL.
  2. Add the schedule entry above.
  3. Deploy, then confirm the check-in arrives within the hour.

Watch the scheduler, not just one task

The hourly version above proves the scheduler itself is alive. That is usually the more valuable signal, because when it dies everything dies together and one alert tells you so.

onSuccess and onFailure need Laravel 9+

On older versions, chain the ping onto the command itself with `->then()` or append the curl in the cron line.