<?php

namespace App\Console;

use App\Console\Commands\Apollo;
use App\Console\Commands\CommunityMemberStatistics;
use App\Console\Commands\Downloads;
use App\Console\Commands\MusicImport;
use App\Console\Commands\PostCollectBean;
use App\Console\Commands\PostCreateBean;
use App\Console\Commands\PostStatistics;
use App\Console\Commands\PostYesterday;
use App\Console\Commands\TopicUseCount;
use App\Console\Commands\Trace;
use App\Console\Commands\UpdatePostInfo;
use App\Console\Commands\UpdatePostStatus;
use App\Console\Commands\UpdateReplyCount;
use App\Console\Commands\UpdateTopicData;
use App\Console\Commands\UpdateTopicUseCount;
use App\Console\Commands\VirusAdd;
use App\Console\Commands\YesterdayGreatPost;
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,
        Trace::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('trace')
            ->everyMinute()
            ->withoutOverlapping()->appendOutputTo($path);
    }
}