0
我的队列 配置/队列配置:为什么命令不能在cron Laravel 5.2中运行?
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
//'table' => 'jobs',
'table' => 'ncste_jobs',
'queue' => 'default',
'expire' => 60,
],
],
'failed' => [
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'ncste_failed_jobs',
],
的Konsole/Kernel.php:
protected function schedule(Schedule $schedule)
{
//here som comand
$schedule->command('sudo supervisorctl stop laravel-worker:*')->name('supervisorctl-stop')->everyMinute()->withoutOverlapping();
$schedule->command('sudo supervisorctl start laravel-worker:*')->name('supervisorctl-start')->everyMinute()->withoutOverlapping();
//here some command
}
的Cron:
* * * * * /usr/bin/php /var/www/mydomain.com/artisan schedule:run 1>>/dev/null 2>&1
为什么这些2命令可以不通过cron工作?如果手动运行它工作。