<?php namespace App\Console; use App\Console\Commands\Apollo; use App\Console\Commands\BehaviorRecord; use App\Console\Commands\CalcPostWeight; use App\Console\Commands\ContentFeedCreate; use App\Console\Commands\ExcellentResidents; use App\Console\Commands\RankingList; use Illuminate\Console\Scheduling\Schedule; use Laravel\Lumen\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { /** * The Artisan commands provided by your application. * * @var array */ protected $commands = [ Apollo::class, BehaviorRecord::class, CalcPostWeight::class, ContentFeedCreate::class, ExcellentResidents::class, RankingList::class ]; /** * Define the application's command schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { $path = storage_path('logs/' . date('Y-m-d') . '-schedule.log'); $schedule->command('post:calc_weight') ->everyFifteenMinutes()->withoutOverlapping()->appendOutputTo($path); $schedule->command('excellent:residents') ->dailyAt('00:05') ->withoutOverlapping()->appendOutputTo($path); $schedule->command('ranking:list') ->dailyAt('00:05') ->withoutOverlapping()->appendOutputTo($path); } }