嗨,很抱歉给您带来麻烦,我在创建计划命令时遇到了这个问题。
在我们的 crontab -e 用户中,我们在 Debian 上插入了以下内容:
* * * * * cd /var/www/myfolder.com/ && php artisan schedule:run >> crontab.laravel
我们已经正确输入了日程功能,如下所示:
应用程序/控制台/kernel.php
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
// 'App\Console\Commands\HelpCenter',
Commands\HelpCenter::class
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return …Run Code Online (Sandbox Code Playgroud)