Laravel “No scheduled commands are ready to run.”

后端 未结 13 1198
囚心锁ツ
囚心锁ツ 2020-12-09 08:39

I\'ve set up the following Laravel commands:

protected function schedule(Schedule $schedule) {
        $schedule->command(\'command:daily-reset\')->dai         


        
13条回答
  •  春和景丽
    2020-12-09 08:50

    Did you try running command manuallay?

    Run php artisan and see if your commands have registered.

    If you have registered your commands you should see command:daily-reset and command:monthly-reset under the list of available artisan commands.

    If you don't see them there go ahead and register your commands by adding it to commands property available in app/Console/Kernel.php.

    protected $commands = [
        'App\Console\Commands\YourFirstCommand',
        'App\Console\Commands\YourSecondCommand'
    ];
    

    Change crontab entry to

    * * * * * php /home/privates/public_html/staging/current/artisan schedule:run

提交回复
热议问题