I'm trying to use Laravel Task Schedule. So I create crontab -e
which is like blow.
* * * * * cd /var/www/html/laravel && php artisan schedule:run >> /dev/null 2>&1
After this I bind my commands to Laravel's App/Kernel which is like below:
protected $commands = [
//
Commands\mitsui::class,
Commands\sumitomo::class,
Commands\nomura::class,
];
And schedule:
protected function schedule(Schedule $schedule)
{
$schedule->command('bot:mitsui')->everyMinute();
$schedule->command('bot:sumitomo')->everyMinute();
$schedule->command('bot:nomura')->everyMinute();
}
Actually it's weekly but I'm trying to checking is it working or not. That's why make it everyMinute
But actually it's not working. commands are not running. Do I missing something here?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire