Laravel Scheduler Monitoring
Monitor Laravel scheduled tasks after the work completes.
Review a Laravel task’s schedule, then monitor its successful completion. Catch missing check-ins from application tasks, queued work, and recurring commands.
5 monitors free · No credit card · Verify your first check-in
A running scheduler and a completed task are different checks.
Laravel’s scheduler selects due tasks. A queued task may complete later in a worker, and a background command may outlive the scheduler invocation. Place the heartbeat at the end of the work whose result matters.
Use a separate monitor if you also want evidence that the host invokes the scheduler. That monitor cannot stand in for every scheduled task.
Laravel scheduler failure modes:
- The scheduler command is never invoked in the deployed environment
- A queue worker is stopped or unable to process the task
- Credentials or required resources fail during the task
- The task’s schedule or timezone differs from the monitor expectation
Setup
Instrument a scheduled command’s actual workload
Example command handler. Store the URL in config/services.php using your deployment secret and replace the workload method.
In this example, performRequiredWork must throw on failure. If your workload returns a status instead, check it and return a failure exit code before reaching the heartbeat. For queued work, use this pattern inside the queue worker’s successful processing path. Keep URLs out of source control and error logs. Review how your application handles exceptions and returns exit codes.
Real-world examples
Inside a Laravel command handle() method
// services.php: 'pingcron' => ['url' => env('PINGCRON_URL')],
public function handle(): int
{
$this->performRequiredWork(); // This method must throw if required work fails.
// Report only after all required work succeeds.
try {
\Illuminate\Support\Facades\Http::timeout(10)
->get(config('services.pingcron.url'))->throw();
} catch (\Throwable $error) {
// Record telemetry failure without logging the private URL.
\Illuminate\Support\Facades\Log::warning('Heartbeat delivery failed');
}
return self::SUCCESS;
}What Laravel scheduled tasks should you monitor?
Anything in app/Console/Kernel.php that has to run.
schedule:run heartbeat
The single cron entry that powers everything else.
Daily reports
reports:generate, customer summaries, internal digests.
Billing commands
subscriptions:bill, invoices:send, payments:retry.
Database maintenance
horizon:purge, queue:prune, custom DB cleanups.
Cache + session cleanup
cache:prune-stale-tags, session:gc, telescope:prune.
Sync jobs
CRM sync, Stripe webhook backfills, search indexing.
Backup commands
spatie/laravel-backup, custom export commands.
Notification dispatchers
Daily digests, reminder emails, scheduled SMS.
How it works
Review the task, install monitoring, and verify completion.
Review the expectation
Match the deployed schedule and timezone, then choose grace for legitimate runtime and delay.
Create and install the monitor
Keep its actual heartbeat URL private and send success only after the required work finishes.
Verify the setup
Confirm the first successful heartbeat and receipt of an alert-destination test.
Alerts where you'll actually see them.
Save alert destinations for the owning account. Email, Slack, and Discord are included on every plan; custom webhooks require Pro or above.
HTML alerts with monitor details and direct links.
Slack
Post to any Slack channel via incoming webhook.
Discord
Native Discord webhook integration.
Custom webhooks
POST alerts to any endpoint with full payload.
FAQ
From configuration to a verified first run
Monitor the task that produces the result you depend on. A successful artisan schedule:run invocation only shows the scheduler command ran; it does not prove a queued or background task completed. Put that task’s heartbeat after its actual work succeeds.
Check a Laravel scheduled task →- Check the host cron entry, working directory, PHP binary, application timezone, and deployed environment.
- For queued work, send success from the worker after processing completes, not when the scheduler dispatches the job.
- Review overlapping runs, shared cache locks, and daylight-saving behavior. A configuration check cannot verify deployed locks or workers.
Before relying on alerts
- Review the monitor’s schedule, timezone, and grace period against the deployed job.
- Save your alert destination in Settings, send a labeled test, and confirm that you received it.
- Run the actual workload through its scheduler and confirm its first successful heartbeat in PingCron. Copying the URL does not install monitoring.
A successful receipt records what the job reported; it does not prove the output is correct. Detection and delivery timing depend on the schedule, grace period, and alert provider.
Read the official scheduler documentationStop assuming Laravel scheduler is running.
Start with one task, its successful receipt, and a confirmed alert destination.
Start monitoring free5 monitors free · No credit card · Verify your first check-in