Provides the Command Scheduling logic of Laravel in a Symfony application

Installs: 178

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 5

Forks: 0

Open Issues: 0


v1.0.0 2019-08-17 13:50 UTC

This package is auto-updated.

Last update: 2019-12-24 22:03:13 UTC


Provides the Command Scheduling logic of Laravel in a Symfony application.


$ composer require loyaltycorp/schedule-bundle

Until a recipe is created for this bundle you will need to register it manually:

// config/bundles.php

return [
    // Other bundles...
    LoyaltyCorp\ScheduleBundle\ScheduleBundle::class => ['all' => true],


Register Your Scheduled Commands

To register the scheduled commands this bundle implements a concept of "schedule providers", thanks to Symfony's autoconfigure feature, the only thing required is to create services that implement LoyaltyCorp\ScheduleBundle\Interfaces\ScheduleProviderInterface. The ScheduleInterface passed to the schedule method offers all the features of the Laravel Console Scheduling.

// src/Schedule/MyScheduleProvider.php

use LoyaltyCorp\ScheduleBundle\Interfaces\ScheduleProviderInterface;

final class MyScheduleProvider implements ScheduleProviderInterface
     * Schedule command on given schedule.
     * @param \Loyaltycorp\ScheduleBundle\Interfaces\ScheduleInterface $schedule
     * @return void
    public function schedule(ScheduleInterface $schedule): void
            ->command('poc:hello-world', ['-v'])

Run The Schedule

This bundle providers a console command to run the schedule:

$ php bin/console schedule:run