fidum / laravel-schedule-queue-command
Provides the ability to queue commands from the Laravel scheduler.
Fund package maintenance!
dmason30
Installs: 17 519
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ^8.1
- illuminate/console: ^10.0|^11.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.0|^8.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0|^9.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
Adds a queueCommand
function to the scheduler that executes the equivalent of Artisan::queue(...)
on the given schedule. It also provides the ability to optionally customise the queue
and connection
if needed.
Installation
You can install the package via composer:
composer require fidum/laravel-schedule-queue-command
Usage
In your laravel projects app/Console/Kernel.php
:
$schedule->queueCommand(FooCommand::class)->everyMinute(); $schedule->queueCommand(FooCommand::class, ['some-argument' => 'foo']); $schedule->queueCommand(FooCommand::class, ['some-argument' => 'foo'], 'queue'); $schedule->queueCommand(FooCommand::class, ['some-argument' => 'foo'], 'queue', 'connection');
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.