Guides/Tutorials

How to Monitor Scheduled Tasks in Laravel (2026)

Updated June 14, 2026 5 min read

Laravel’s scheduler lets you define tasks fluently in code, all driven by a single cron entry calling schedule:run every minute. That single point is also a single point of failure: if that cron stops, or the scheduler errors, every task stops — quietly.

The built-in ping methods

Laravel ships with hooks designed exactly for heartbeat monitoring. Use pingOnSuccess (or thenPing) to notify a monitor only when a task finishes successfully:

use Illuminate\Support\Facades\Schedule;

Schedule::command('backup:run')
    ->dailyAt('03:00')
    ->pingOnSuccess('https://api.cronguard.dev/v1/ping/<your-uuid>')
    ->pingOnFailure('https://api.cronguard.dev/v1/ping/<your-uuid>/fail');

pingOnSuccess fires an HTTP request to the URL after the task succeeds; pingOnFailure fires if it throws. To bracket the whole run and capture execution time, add pingBefore:

Schedule::command('reports:generate')
    ->hourly()
    ->pingBefore('https://api.cronguard.dev/v1/ping/<your-uuid>/start')
    ->pingOnSuccess('https://api.cronguard.dev/v1/ping/<your-uuid>')
    ->pingOnFailure('https://api.cronguard.dev/v1/ping/<your-uuid>/fail');

Don’t forget the scheduler itself

The pings above only fire if schedule:run is actually executing. Add a separate monitor for the scheduler heartbeat by scheduling a tiny task that pings every minute — if that ping stops, you know the whole scheduler is down:

Schedule::call(fn () => null)
    ->everyMinute()
    ->pingOnSuccess('https://api.cronguard.dev/v1/ping/<your-uuid>');
Tip: also confirm the OS cron entry exists — the scheduler is only as reliable as the single cron line that drives it: * * * * * cd /path && php artisan schedule:run >> /dev/null 2>&1

Getting alerted

Point those ping URLs at CronGuard monitors with the right expected schedule and grace period. When a Laravel task fails to check in — whether the command errored, the scheduler died or the server went down — you get an instant alert over SMS, WhatsApp, Slack, Telegram or email. Setup is free and takes about a minute.

Stop losing sleep over silent failures

CronGuard alerts you within minutes when a scheduled job fails to check in. No agent to install. Free to start.

Start Monitoring Free