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 each run’s start, finish, failure, or skip to the database. Use an Artisan list command to see execution history and spot issues. Optional Oh Dear sync alerts you when tasks fail or don’t run on time.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Observability & Reliability Roadmap:

    • Add real-time monitoring of scheduled tasks (e.g., cron jobs, Laravel tasks) to the product roadmap to proactively detect failures, delays, or performance degradation.
    • Integrate alerting (via Oh Dear or custom webhooks) for critical scheduled tasks to reduce MTTR (Mean Time to Recovery).
    • Enable historical analysis of task execution (e.g., runtime, memory usage, success/failure rates) to optimize performance or resource allocation.
  • Build vs. Buy Decision:

    • Buy: Avoid reinventing the wheel by leveraging this package instead of building a custom monitoring solution, saving dev time and reducing technical debt.
    • Extend: Use the package as a foundation to add custom dashboards, SLAs, or integrations (e.g., PagerDuty, Datadog) for advanced use cases.
    • Compliance/Regulatory Use Cases: Track and audit scheduled tasks for compliance (e.g., GDPR data processing logs, financial batch jobs).
  • Key Features to Prioritize:

    • Automated Sync: Ensure schedule-monitor:sync is triggered post-deploy (CI/CD pipeline integration) to keep Oh Dear/DB in sync with the latest schedule.
    • Grace Time Tuning: Allow teams to configure task-specific grace periods (e.g., 10 mins for long-running jobs vs. 2 mins for quick tasks).
    • Output Storage: Enable storing command output in the DB for debugging failed tasks without manual log scraping.
    • Multitenancy Support: Critical for SaaS products to avoid tenant-aware job conflicts with Oh Dear pings.
  • Use Cases:

    • DevOps/Platform Teams: Monitor infrastructure-heavy tasks (e.g., backups, cache warming) to ensure uptime.
    • Product Teams: Track feature-dependent tasks (e.g., "nightly feature flag sync") to align with release cycles.
    • Customer Support: Provide visibility into internal processes (e.g., "When was the last time user data was processed?") for troubleshooting.

When to Consider This Package

  • Adopt This Package If:

    • Your Laravel app relies on scheduled tasks (cron jobs, Schedule::command(), Schedule::job()) that require reliability guarantees (e.g., payments, data syncs, reports).
    • You lack real-time visibility into task execution (e.g., no logs, no alerts for failures/delays).
    • You use Oh Dear or need a low-code alerting solution for cron job failures (alternative: build custom webhook integrations).
    • Your team wants to reduce toil in debugging missed/failed tasks (e.g., no more "Why didn’t this run yesterday?" fire drills).
    • You’re in a SaaS/multitenant environment and need tenant-agnostic monitoring for shared infrastructure tasks.
  • Look Elsewhere If:

    • You need sub-second granularity (this package logs at task start/end, not per-second).
    • Your tasks are stateless and don’t require historical tracking (e.g., one-off CLI scripts).
    • You’re using non-Laravel frameworks (e.g., Symfony, Node.js) or need cross-language monitoring.
    • You require advanced metrics (e.g., CPU/memory trends over time) beyond what this package provides (consider Prometheus + Grafana).
    • Your alerting needs are highly customized (e.g., escalation policies, multi-channel routing) and Oh Dear’s integrations are insufficient.
  • Alternatives to Evaluate:

    • Custom Solution: Build a lightweight logger + alerting system using Laravel Events/Listeners if Oh Dear integrations are overkill.
    • Third-Party Tools: Tools like Cronitor, Dead Man’s Snitch, or Healthchecks.io for simpler cron monitoring (no Laravel-specific features).
    • Observability Stack: Combine with Laravel Horizon (for queues) + Sentry (for errors) if you need end-to-end visibility.

How to Pitch It (Stakeholders)

For Executives (Business Impact)

*"This package solves a critical blind spot in our Laravel infrastructure: we don’t know if our scheduled tasks are running reliably. Missed cron jobs can lead to:

  • Customer impact: Failed payment processing, delayed reports, or broken features.
  • Operational risk: Undetected failures in backups, cache invalidation, or data syncs.
  • Reputation damage: Slow responses to support tickets about ‘missing’ processes.

By adopting Laravel Schedule Monitor, we’ll:

  1. Automate alerts for failed/delayed tasks (via Oh Dear’s Slack/email/SMS integrations), reducing fire drills.
  2. Gain visibility into task performance (runtime, memory usage) to optimize costs and reliability.
  3. Future-proof our infrastructure with a scalable, low-maintenance solution (MIT-licensed, actively maintained).

Ask: Should we prioritize this for our [QX] release to improve uptime SLA compliance?"*


For Engineering (Technical Value)

*"This package provides three key technical benefits with minimal setup:

  1. Zero-Cost Observability:
    • Logs task start/end/failures to a DB table with metadata (runtime, memory, output).
    • CLI commands (schedule-monitor:list) give instant visibility into task health.
  2. Oh Dear Integration:
    • Syncs Laravel tasks to Oh Dear for alerting (configurable grace periods, multi-channel notifications).
    • Avoids building custom webhook/ping systems.
  3. Extensible:
    • Customize grace times, ignore non-critical tasks, or store command output in the DB.
    • Works with multitenancy (via spatie/laravel-multitenancy).

Proposal:

  • Phase 1: Add to composer.json + configure DB logging (1 hour).
  • Phase 2: Integrate Oh Dear alerts for critical tasks (e.g., payments, backups) (2 hours).
  • Phase 3: Add schedule-monitor:sync to CI/CD pipeline (e.g., post-deploy hook).

Trade-offs:

  • No real-time dashboards: Use existing tools (e.g., Laravel Nova, custom admin panel) to visualize logs.
  • Oh Dear dependency: If we want to avoid it, we can disable the feature and use the DB logs + custom alerts.

Next Steps:

  • Review the config options to tailor grace times/retention.
  • Decide if we need to store command output in the DB for debugging."*
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport