Skip to content

Laravel Run Schedule/Command Every Few Seconds

dhtmldhtml Posts: 27

There are times you need shorter intervals to run your artisan commands.

This package does it for you -

The great thing about this package is that it works for both laravel and lumen.

$ composer require spatie/laravel-short-schedule

$ php artisan short-schedule:run

// in app\Console\Kernel.php
protected function shortSchedule(\Spatie\ShortSchedule\ShortSchedule $shortSchedule) { // this artisan command will run every second $shortSchedule->command('artisan-command')->everySecond(); }

Sign In or Register to comment.