本文介绍了laravel错误cron使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Laravel错误
App \ Console \ Kernel:
App\Console\Kernel:
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use App\User;
use Log;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
\App\Console\Commands\Inspire::class,
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
Log::info('1');
$schedule->call(function () {
$user = User::find(1);
$user->first_name = 'cron...';
$user->save();
})->everyMinute();
}
}
日志:
推荐答案
有必要放置更高版本的php
It was necessary to put a higher version of php
这篇关于laravel错误cron使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!