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.
Campaign every Monday at 9 AM"), reducing reliance on static cron jobs or external services. This directly supports feature flags for time-sensitive functionalities (e.g., compliance checks, user-specific notifications) without requiring separate infrastructure.Subscription, Invoice, User), enabling granular control over when actions occur. Ideal for user-specific automation (e.g., "send a reminder to this User every 7 days").ScheduleTriggered events, enabling async processing (e.g., queue jobs, send emails) and observability. Supports microservices architectures where scheduling logic is decoupled from execution.php-rrule or Recurr) allows for advanced scheduling (e.g., "every 3rd Friday of the month" or "last day of the month"), addressing edge cases that cron expressions struggle with.php-rrule behavior for edge cases). Enables tailored solutions without sacrificing maintainability.Adopt if:
User, Order, or Campaign instances) where actions must be triggered based on dynamic data.schedules:run command in your deployment pipeline, and maintain the scheduling logic long-term.Look elsewhere if:
Schedule facade or server cron is sufficient and overkill for this package.schedules:run command, as Cadence requires active integration into your application’s workflow.For Executives:
"Cadence is a model-based scheduling system for Laravel that transforms how we automate time-sensitive workflows—like generating reports, sending notifications, or running analyses—directly within our application. Instead of relying on external cron jobs or manual processes, we can now schedule actions tied to specific data models (e.g., ‘generate an invoice for this Subscription every month’ or ‘send a reminder to this User at 9 AM in their local timezone’). This reduces operational overhead, minimizes missed deadlines, and scales with our business needs. It’s a low-risk investment: open-source (MIT license), actively maintained, and built for Laravel, so it integrates seamlessly with our existing stack. The result? Fewer manual processes, more reliable automation, and the flexibility to adapt schedules as our use cases evolve."
For Engineering: *"Cadence replaces fragmented cron jobs with a unified, model-aware scheduler that’s event-driven and extensible. Here’s why it’s a game-changer for us:
Report::find(1)->addSchedule()), giving us fine-grained control over when actions fire—no more guessing which cron job handles what.php-rrule or Recurr) for complex recurrence (e.g., ‘every 3rd Friday’ or ‘last day of the month’), covering edge cases cron can’t handle.ScheduleTriggered events, which we can queue, log, or observe—perfect for async workflows or microservices where scheduling and execution are decoupled.php-rrule for edge cases), ensuring we’re not locked into one-way scheduling.schedules:run command give us full control over how schedules are processed.Trade-offs:
schedules:run command in your scheduler).Next Steps:
Campaign models) to validate the setup and performance.ScheduleTriggered events will map to our existing job queues or services.schedules:run command is added to our scheduler and runs reliably (e.g., every minute via Laravel’s task scheduler).This is a strategic upgrade from ad-hoc cron to a scalable, maintainable system that grows with our application."*
How can I help you explore Laravel packages today?