Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Schedule Monitor

Laravel Schedule Monitor Laravel Package

spatie/laravel-schedule-monitor

Monitors your Laravel schedule, logging each task's start, finish, failure, and skip to a database table. Check execution history with the list command, and sync with Oh Dear to get alerts when scheduled tasks fail or don't run on time.

View on GitHub
Deep Wiki
Context7

spatie/laravel-schedule-monitor keeps an eye on your Laravel schedule. Every time a scheduled task starts, ends, fails, or is skipped, it writes an entry to a log table in your database. A handy list command lets you inspect exactly when each task ran, so you can spot missed or failing jobs at a glance.

The package can also sync your schedule with Oh Dear, which notifies you whenever a scheduled task doesn't run on time or fails.

  • Logs every scheduled task start, finish, failure, and skip
  • list command to review task execution history
  • Optional Oh Dear integration for uptime alerts
  • Configurable via a publishable config file
  • Easy install with published migrations
Frequently asked questions about Laravel Schedule Monitor
How do I install spatie/laravel-schedule-monitor in a Laravel app?
Run composer require spatie/laravel-schedule-monitor, publish the schedule-monitor migrations and config, then run php artisan migrate. Add schedule-monitor:sync to your deploy script so new scheduled tasks are registered, and use schedule-monitor:list to review execution history. The package creates new tables only and makes no destructive schema changes.
Does spatie/laravel-schedule-monitor support Laravel 8?
Yes, but Laravel 8 requires installing v2 with composer require spatie/laravel-schedule-monitor:^2. Newer Laravel applications can use the current major version. Check the PHP constraint and config-cache path in your target app before committing.
How does laravel-schedule-monitor record scheduled task runs?
It hooks Laravel scheduler events for starting, finished, failed, and skipped tasks and writes rows to monitored_scheduled_tasks and monitored_scheduled_task_log_items. Each log item can include start and end times, memory usage, duration, and optional output. This gives you a queryable execution history without an agent, daemon, or sidecar.
Why is my scheduled task missing from schedule-monitor:list?
The most common cause is not running schedule-monitor:sync after adding or renaming a task, especially when the deploy step is skipped, so the task remains silently unmonitored. Closures and Schedule::call entries need an explicit monitorName() because the package cannot infer a stable name. Renaming a task also deletes its existing log history and creates a fresh monitor.
How do I sync my Laravel schedule with Oh Dear?
Configure your Oh Dear credentials in the published schedule-monitor config, then run php artisan schedule-monitor:sync. The command creates or updates Oh Dear cron monitors for your Laravel scheduled tasks and enables alerts when a task fails or runs late. Run it as part of every deploy so newly added tasks are covered.
What is the difference between schedule-monitor:sync and --keep-old?
By default schedule-monitor:sync is destructive: it removes Oh Dear cron monitors that are not defined by your Laravel schedule. With --keep-old it will not remove any existing monitors, which preserves external cron jobs but also never cleans up stale monitors. Choose deliberately based on whether Oh Dear or Laravel is the source of truth for all cron jobs.
How do I fix false late alerts for long-running scheduled tasks?
The default grace time is 5 minutes, which is too tight for long reports, exports, or sync jobs. Tune graceTimeInMinutes() per scheduled task to match realistic runtimes and avoid alert noise. Review tasks that routinely exceed 5 minutes and assign values with the team that owns the schedule.
How do I prune old schedule monitor log entries?
Add the prune command for MonitoredScheduledTaskLogItem to your schedule, for example model:prune --model=MonitoredScheduledTaskLogItem. Without pruning, high-frequency tasks can generate large log tables quickly. A per-minute task can create roughly 1,400 rows per day before start and end duplication.
Does laravel-schedule-monitor work with Horizon and spatie/laravel-multitenancy?
Horizon users get a silencing config and should confirm it is enabled. With spatie/laravel-multitenancy, add PingOhDearJob to not_tenant_aware_jobs or Oh Dear dispatch will fail in tenant context. The core database logging path remains in-process and does not require a queue worker.
What are alternatives to spatie/laravel-schedule-monitor?
Alternatives include external cron monitors such as Oh Dear, Healthchecks.io, and Cronitor, plus existing error tracking like Sentry, Datadog, or Horizon for failed jobs. This package is strongest when you want Laravel-native execution history plus optional Oh Dear sync. Remember it cannot report that the scheduler itself stopped; an external heartbeat is still needed to close that gap.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo