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

Scheduler Laravel Package

abc/scheduler

Experimental PHP scheduler library for running jobs based on CRON expressions. Define schedule providers and processors via simple interfaces, bind them in a Scheduler, and execute due schedules with an included Symfony Console command (abc:schedule).

View on GitHub
Deep Wiki
Context7

php-scheduler

A PHP library to process schedules base on CRON expressions.

Features:

  • Define schedules based on CRON expressions
  • Symfony Console Command to run scheduler
  • Simple integration by implementing two interfaces

Build Status

Note: This project is still experimental!

Installation

composer require abc/scheduler

Getting Started

  1. Define a schedule provider by implementing ProviderInterfacve.

    namespace Abc\Scheduler;
    
    interface ProviderInterface
    {
        /**
         * @return string The provider's name, used to bind a provider to processors
         */
        public function getName(): string;
    
        /**
         * @param int|null $limit
         * @param int|null $offset
         * @return ScheduleInterface[]
         */
        public function provideSchedules(int $limit = null, int $offset = null): array;
    
        public function save(ScheduleInterface $schedule): void;
    }
    
  2. Define a schedule processor by implementing ProcessorInterface.

    namespace Abc\Scheduler;
    
    /**
     * Process a schedule that is due.
     */
    interface ProcessorInterface
    {
        public function process(ScheduleInterface $schedule);
    }
    
  3. Bind Processor to Provider and initialize the ScheduleCommand

    use Abc\Scheduler\Scheduler;
    use Abc\Scheduler\Symfony\ScheduleCommand;
    
    $myProvider = new MyProvider();
    $myProcessor = new MyProcessor();
    
    $scheduler = new Scheduler();
    $scheduler->bind($myProvider, $myProcessor);
    
    $command = new ScheduleCommand($scheduler);
    
  4. Run the command

    bin/console abc:schedule
    

License

The MIT License (MIT). Please see License File for more information.

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.
calliostro/spotify-bundle
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle