Weave Code
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 Package

spatie/laravel-schedule-monitor

Monitor Laravel scheduled tasks by logging starts, finishes, failures, and skips to a database table and viewing run history via an Artisan command. Optionally sync with Oh Dear to get alerts when tasks fail or don’t run on time.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Observability & Reliability: Enables proactive monitoring of scheduled tasks (e.g., cron jobs, queued jobs) to detect failures, delays, or performance degradation in production. Critical for systems where uptime and task reliability are non-negotiable (e.g., payment processing, reporting, or data syncs).
  • DevOps/Engineering Efficiency: Reduces manual debugging of "why didn’t this job run?" by providing a centralized log of task execution history, memory usage, and runtime metrics. Aligns with SRE principles by automating alerting for missed/failed tasks.
  • Build vs. Buy: Buy—avoids reinventing observability infrastructure. The package integrates seamlessly with Laravel’s ecosystem (e.g., Horizon, multitenancy) and offers Oh Dear integration for external alerts, reducing tooling fragmentation.
  • Scalability: Supports large-scale deployments with configurable log retention (e.g., pruning old entries) and queue-based Oh Dear pings to minimize latency.
  • Roadmap Priorities:
    • Phase 1: Implement basic monitoring for critical scheduled tasks (e.g., schedule-monitor:sync + CLI checks).
    • Phase 2: Integrate Oh Dear for external alerts (e.g., Slack/SMS) and set up automated pruning.
    • Phase 3: Extend to non-Laravel cron jobs (via --keep-old flag) or custom dashboards (e.g., Laravel Nova integration).
  • Use Cases:
    • Mission-Critical Jobs: E.g., nightly batch jobs for financial reconciliations or inventory updates.
    • Multi-Tenant Apps: Track job execution per tenant (with multitenancy support).
    • CI/CD Pipelines: Verify scheduled tasks post-deploy via schedule-monitor:verify.
    • Performance Tuning: Identify slow-running jobs via execution time/memory metrics in logs.

When to Consider This Package

  • Adopt if:

    • Your Laravel app relies on scheduled tasks (commands, jobs, closures) where failures would have high business impact (e.g., revenue, compliance, user experience).
    • You lack a centralized way to audit when tasks ran/succeeded/failed (e.g., no existing logging or monitoring).
    • You use Oh Dear or need external alerts (Slack, email) for missed tasks—this package bridges Laravel and Oh Dear natively.
    • Your team spends time manually checking cron logs or debugging "ghost" jobs (e.g., tasks that should run but don’t appear in logs).
    • You need metrics beyond success/failure, such as execution duration, memory usage, or output capture.
  • Look Elsewhere if:

    • You’re using non-Laravel cron jobs (e.g., plain Bash scripts) and need unified monitoring—consider Oh Dear’s native cron monitoring or a dedicated tool like Datadog Cron Monitoring.
    • Your stack is not PHP/Laravel (e.g., Node.js, Python)—use language-specific tools (e.g., node-cron + external monitoring).
    • You need advanced alerting (e.g., multi-level escalations, custom thresholds) beyond Oh Dear’s capabilities—combine with tools like PagerDuty or Laravel’s built-in notifications.
    • You require real-time dashboards—this package focuses on logs/CLI; pair with Laravel Nova, Grafana, or Sentry for visualizations.
    • Your team prefers serverless (e.g., AWS Lambda) over Laravel’s task scheduler—use CloudWatch Events or Step Functions monitoring.

How to Pitch It (Stakeholders)

For Executives/Business Leaders:

"This package turns ‘hope-based’ scheduled tasks into observable, reliable processes. Imagine knowing instantly if a nightly revenue report fails—or if a critical data sync stalls—without manual checks. By integrating with Oh Dear, we’ll get automated alerts (Slack/email) for missed tasks, reducing downtime risks. It’s a low-lift way to add enterprise-grade reliability to our Laravel backend, with minimal dev overhead."

Key Outcomes:

  • Reduced outages: Catch failed tasks before they impact users/customers.
  • Faster debugging: Logs include execution time, memory usage, and output—no more guessing why a job vanished.
  • Scalable alerts: Oh Dear supports SMS, webhooks, etc., so we’re not locked into one notification channel.
  • Cost-effective: Open-source (MIT license) with no per-seat fees; avoids custom dev work.

For Engineering Teams:

*"This solves three pain points:

  1. Visibility: No more ‘did the job run?’—get a CLI (schedule-monitor:list) or DB-backed audit trail of every task execution.
  2. Alerting: Sync with Oh Dear to turn cron failures into actionable alerts (e.g., Slack pings for missed jobs).
  3. Debugging: Logs include runtime metrics (memory, duration) and output—critical for optimizing slow jobs.

Implementation:

  • 5-minute setup: Run composer require spatie/laravel-schedule-monitor, publish migrations, and add schedule-monitor:sync to deployments.
  • Zero runtime overhead: Logs are written asynchronously; prune old entries automatically.
  • Extensible: Customize grace times, ignore non-critical jobs, or store output in the DB.

Trade-offs:

  • Not a dashboard: Use alongside tools like Nova or Grafana for visualizations.
  • Oh Dear dependency: If you don’t use Oh Dear, you’ll miss external alerts—but the core logging works standalone.

Next Steps:

  1. Pilot on 3–5 high-risk scheduled tasks (e.g., payment processing, reports).
  2. Integrate Oh Dear for alerts (configurable via .env).
  3. Automate pruning and sync in CI/CD.

Why now? Every missed task is a risk—this turns cron jobs from ‘black boxes’ into managed services."*

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.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai