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

Cadence Laravel Package

directorytree/cadence

Cadence adds model-based scheduling to Laravel. Attach one or more cron or RRULE schedules to any Eloquent model, track due runs, and dispatch events when schedules trigger. Driver-based design supports cron, php-rrule, Recurr, or custom drivers.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Dynamic Workflow Automation: Enables scheduling of actions directly tied to Eloquent models (e.g., "generate a report for this Campaign every Monday at 9 AM"), reducing reliance on static cron jobs or external services.
  • Roadmap Prioritization: Justifies investment in time-sensitive features (e.g., compliance checks, user-specific notifications) by providing a scalable, maintainable solution for recurring tasks.
  • Build vs. Buy: Avoids reinventing scheduling logic while offering extensibility (custom drivers, event listeners) without vendor lock-in. MIT license ensures compliance and flexibility.
  • Use Cases:
    • Model-Driven Scheduling: Attach schedules to any Eloquent model (e.g., Subscription, Invoice, User), enabling granular control over when actions occur.
    • Multi-Timezone Support: Schedule events in user-specific or regional timezones (e.g., "send reminder at 9 AM local time"), critical for global applications.
    • Event-Driven Architecture: Decouple scheduling from business logic via ScheduleTriggered events, enabling async processing (e.g., queue jobs, send emails) and observability.
    • Complex Recurrence Rules: Support for RRULE (via php-rrule or Recurr) allows for advanced scheduling (e.g., "every 3rd Friday of the month" or "last day of the month").
    • Custom Logic: Extend with domain-specific drivers (e.g., "run every 7 days after order creation") or configure underlying libraries (e.g., tweak php-rrule behavior).

When to Consider This Package

  • Adopt if:

    • Your Laravel application requires model-specific scheduling (e.g., schedules tied to User, Order, or Campaign instances).
    • You need flexible recurrence rules (cron or RRULE) without sacrificing maintainability or extensibility.
    • Your workflows benefit from event-driven execution (e.g., triggering jobs, notifications, or analyses when schedules fire).
    • You’re using Laravel 11+ and PHP 8.2+, ensuring compatibility with modern Laravel features.
    • You want to avoid cron complexity (e.g., managing server cron jobs, parsing expressions) while retaining control over scheduling logic.
    • Your team can dedicate time to integrate event listeners and set up the schedules:run command in your deployment pipeline.
  • Look elsewhere if:

    • Your use case involves simple, system-wide tasks (e.g., cache clearing, log rotation), where Laravel’s built-in Schedule facade or server cron is sufficient.
    • You lack developer resources to implement event listeners, migrations, or the schedules:run command.
    • You require serverless or distributed scheduling (e.g., AWS EventBridge, Cloud Scheduler), as Cadence assumes a Laravel app instance is always running.
    • Your project uses legacy Laravel versions (pre-11) or PHP < 8.2, requiring significant upgrades.
    • You need GUI management for schedules (consider Laravel Nova, custom admin panels, or third-party tools like Laravel Horizon for queue-based scheduling).

How to Pitch It (Stakeholders)

For Executives: "Cadence is a model-based scheduling system for Laravel that lets us automate time-sensitive workflows (e.g., reports, notifications, analyses) directly within our application—without relying on external services or manual cron jobs. For example, we could schedule a ‘generate invoice’ action to run automatically every month for a Subscription model, or send a reminder to users at 9 AM in their local timezone. This reduces operational overhead, improves reliability, and unlocks dynamic, user-specific automation. It’s low-risk: open-source (MIT license), actively maintained, and integrates seamlessly with our existing Laravel stack. The payoff? Fewer manual processes, fewer missed deadlines, and the ability to scale automation as our business grows."

For Engineering: *"Cadence replaces ad-hoc cron jobs with a model-aware, event-driven scheduler. Here’s why it’s a fit for us:

  • Polymorphic Schedules: Attach schedules to any Eloquent model (e.g., Report::find(1)->addSchedule()), enabling granular control over when actions fire.
  • Driver Flexibility: Use cron for simplicity or RRULE (via php-rrule or Recurr) for complex recurrence (e.g., ‘every 3rd Friday’ or ‘last day of the month’).
  • Timezone Support: Schedule events in user/local timezones via Carbon, critical for global applications.
  • Event-Driven: Trigger actions via ScheduleTriggered (e.g., dispatch jobs, send emails), decoupling scheduling from business logic.
  • Extensible: Add custom drivers or tweak underlying libraries (e.g., configure php-rrule behavior). Tradeoffs:
  • Requires a schedules:run Artisan command (run every minute via Laravel’s scheduler).
  • Best for model-specific tasks; not a replacement for system-wide cron jobs. Ideal if we’re building features where tasks are tied to business objects (e.g., ‘run this analysis for this Campaign’) rather than global system tasks."*

For Product Managers: *"Cadence enables us to build scheduling directly into our product’s features without relying on external tools or manual processes. For example:

  • Recurring Reports: Automate monthly/quarterly reports tied to specific Client or Project models.
  • User Notifications: Send time-sensitive alerts (e.g., ‘your subscription renews in 3 days’) in the user’s timezone.
  • Compliance Checks: Run audits or validations on a schedule (e.g., ‘check for overdue payments every Friday’). This reduces friction for users and our team, as schedules are managed alongside the data they operate on—no more guessing which cron job does what. It also gives us flexibility to iterate on scheduling logic (e.g., A/B testing different frequencies) without redeploying infrastructure."*
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.
ilhamsyabani/laravel-volt-starter
thethunderturner/filament-latex
ghostcompiler/laravel-querybuilder
webrek/laravel-telescope-mongodb
anousss007/blatui
zatona-eg/zatona-eg-api
cocosmos/filament-sticky-save-bar
patrickbussmann/oauth2-apple
3brs/enterprise-security-bundle
anousss007/vigilance
supportpal/eloquent-model
ardenexal/fhir-models
laravel-at/laravel-image-sanitize
romalytar/yammi-audit-log-laravel
ardenexal/fhir-validation
arshaviras/weather-widget
laravel-chronicle/core
sunchayn/nimbus
daikazu/eloquent-salesforce-objects
unseen-codes/chat