I have made a scheduler. When I call it with php artisan userRanking
it works.
This is the code in Kernel.php
:
protected $commands = [
\App\Console\Commands\UserRanking::class,
];
protected function schedule(Schedule $schedule)
{
$schedule->command('userRanking')
->everyMinute();
}
How do I dispatch it so that it runs automatically?