小编Roh*_*hah的帖子

Laravel 5.2 Cron没有开发centos

当我试图在localhost(php版本:PHP 5.6.4-4ubuntu6.4(cli))上运行Task Schedular时,它运行正常.

crontab中

* * * * * php /home/aishatest/public_html/Aisha/Aisha/artisan schedule:run >> /dev/null 2>&1
Run Code Online (Sandbox Code Playgroud)

应用程序/软件/ Kernel.php

<?php

namespace App\Console;

use App\Console\Commands\CheckOutfitAvailibilityCommand;
use App\Http\Controllers\OutfitCronController;
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 = [
        // Commands\Inspire::class,
        CheckOutfitAvailibilityCommand::class
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        \Log::error("Kernel");
        //$schedule->command('inspire') …
Run Code Online (Sandbox Code Playgroud)

cron php-5.6 centos6.5 laravel-5.2 taskscheduler

5
推荐指数
1
解决办法
969
查看次数

标签 统计

centos6.5 ×1

cron ×1

laravel-5.2 ×1

php-5.6 ×1

taskscheduler ×1