symfony/scheduler
Schedule recurring tasks through Symfony Messenger with the Scheduler component. Define cron-based schedules, dispatch messages automatically, and integrate cleanly with your existing Symfony applications.
artisan schedule:run), which is optimized for Laravel’s architecture (e.g., time-zone support, dependency injection, and Horizon monitoring).artisan schedule: tasks to Symfony’s ScheduleProviderInterface.Schedule::call(), Schedule::job() with DI).#[AsCronTask] or ScheduleProviderInterface, breaking existing artisan schedule: syntax.http-client or mailer).artisan schedule: tasks must be refactored to Symfony’s ScheduleProviderInterface, requiring significant developer time.#[AsCronTask] commands) won’t appear in Horizon or Telescope without custom logging.spatie/scheduler)?Schedule::command('emails:send')->daily()) compared to Symfony’s #[AsCronTask] or ScheduleProviderInterface.Option 1: Avoid Symfony Scheduler (Recommended)
artisan schedule:run) with:
spatie/scheduler (for advanced cron syntax).laravel-horizon (for queue monitoring).Option 2: Hybrid Adoption (High Risk)
Option 3: Full Migration (Not Recommended)
ScheduleProviderInterface.artisan schedule:run with Messenger consumers.Schedule::call() supports direct service injection; Symfony’s #[AsCronTask] requires workarounds (e.g., #[Autowire]).symfony/serializer, symfony/options-resolver).How can I help you explore Laravel packages today?