小编Mws*_*LLC的帖子

没有计划的命令可以运行 | 仅在 $schedule 中

  • Laravel 版本:5.7.25
  • PHP 版本:7.2.14
  • 数据库驱动程序和版本:MySQL 2ª gen。5.7

嗨,很抱歉给您带来麻烦,我在创建计划命令时遇到了这个问题。

描述:

在我们的 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)

laravel laravel-5 laravel-5.7

2
推荐指数
1
解决办法
3975
查看次数

标签 统计

laravel ×1

laravel-5 ×1

laravel-5.7 ×1