Monitor the Laravel task scheduler
On this page
The whole Laravel scheduler hangs on one system cron line that runs schedule:run every minute. If that line is lost in a server rebuild, every scheduled task stops at once without an error. Laravel can ping a URL before and after a task, which is all a heartbeat check needs.
How can a scheduled job fail silently on Laravel scheduler?
- Laravel needs a single cron entry that runs php artisan schedule:run every minute. If the entry is missing or points at a path that no longer exists, no scheduled task runs.
- Scheduled tasks do not run while the application is in maintenance mode unless a task calls evenInMaintenanceMode.
- By default a task runs even if the previous run is still going. withoutOverlapping prevents that with a cache lock that expires after 24 hours by default, so a task that crashed mid-run can stay locked out for a day.
- Time zone use can make a task run twice or not at all when daylight saving changes, and the Laravel documentation recommends avoiding time zone scheduling when possible.
- Tasks run in the order defined unless runInBackground is used, so one slow task can delay the next.
What are the limits of Laravel scheduler?
| Limit | What the documentation says |
|---|---|
| Scheduler entry | One cron line that runs schedule:run every minute. |
| Sub-minute tasks | With everySecond style tasks, schedule:run keeps running to the end of the current minute. |
| withoutOverlapping lock | Expires after 24 hours unless you pass a number of minutes. |
| Ping helpers | pingBefore, thenPing, pingOnSuccess and pingOnFailure, plus conditional versions. |
| Failure | A failure is a scheduled Artisan or system command that ends with a non-zero exit code. |
How do you add a CronMissed ping to Laravel scheduler?
Use the scheduler's own ping helpers. pingBefore reports the start, pingOnSuccess the finish, and pingOnFailure the failure. Put the three URLs in the configuration, not in code.
use Illuminate\Support\Facades\Schedule;
Schedule::command('reports:nightly')
->dailyAt('03:15')
->withoutOverlapping()
->onOneServer()
->pingBefore(config('services.cronmissed.nightly').'/start')
->pingOnSuccess(config('services.cronmissed.nightly'))
->pingOnFailure(config('services.cronmissed.nightly').'/fail');The operating system entry that drives everything is the one line from the Laravel documentation. Give it its own check so a lost entry is noticed.
* * * * * cd /var/www/app && php artisan schedule:run >> /dev/null 2>&1 && curl -fsS --max-time 10 -o /dev/null https://ping.cronmissed.com/5f0c1b2e-7a3d-4c8e-9b61-2d4f8a7e3c10Which check settings fit Laravel scheduler?
Create a cron check for the task with its dailyAt time in the time zone your app uses. Create a second simple check with a period of 60 seconds and a grace of 3 minutes for the schedule:run line itself: it is the cheapest way to know the scheduler is alive. Add grace for the run time, since scheduled tasks start in the order defined.
How do you confirm the check works?
- Run php artisan schedule:list to see each task and when it runs next.
- Run php artisan schedule:run by hand and confirm the pings for any due task.
- Comment out the crontab line for a few minutes and confirm the scheduler check goes late and then down.
Sources
- Laravel documentation: task scheduling , read 22 October 2026
Questions and answers
- Yes. The lock stops a second copy from running, and the heartbeat tells you when a stale lock has stopped the task from running at all.
- Every task depends on that line. A 60 second heartbeat on it alerts within a few minutes if the whole scheduler goes quiet, before any single task has had its turn to be late.
Should I use withoutOverlapping and a heartbeat together?
Why is the second check on schedule:run worth it?
Create a check, add the ping to the job, and CronMissed alerts you the first time a run is late or reports a failure.
Start monitoring