Weave 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

Schedule Bundle Laravel Package

eonx-com/schedule-bundle

Brings Laravel's command scheduling to Symfony: register scheduled commands via autoconfigured schedule providers with the full Laravel scheduling API, then run them with the schedule:run console command.

View on GitHub
Deep Wiki
Context7

Installation

$ composer require eonx-com/schedule-bundle

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

// config/bundles.php

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

Usage

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 EonX\ScheduleBundle\Interfaces\ScheduleProviderInterface. The ScheduleInterface passed to the schedule method offers all the features of the Laravel Console Scheduling.

// src/Schedule/MyScheduleProvider.php

use EonX\ScheduleBundle\Interfaces\ScheduleProviderInterface;

final class MyScheduleProvider implements ScheduleProviderInterface
{
    /**
     * Schedule command on given schedule.
     *
     * @param \EonX\ScheduleBundle\Interfaces\ScheduleInterface $schedule
     *
     * @return void
     */
    public function schedule(ScheduleInterface $schedule): void
    {
        $schedule
            ->command('poc:hello-world', ['-v'])
            ->everyMinute()
            ->setMaxLockTime(120);
    
        $schedule
            ->command('poc:hello-world-2')
            ->everyFiveMinutes();
        }
    }
}

Run The Schedule

This bundle providers a console command to run the schedule:

$ php bin/console schedule:run
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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route