123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?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\ContentFeedDelete;
- use App\Console\Commands\DelPostNewReply;
- use App\Console\Commands\ExcellentResidents;
- use App\Console\Commands\RankingList;
- use App\Console\Commands\Tem\DelMemberRepeatTopic;
- use App\Console\Commands\Tem\DelPostNewComment;
- 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,
- ContentFeedDelete::class,
- ExcellentResidents::class,
- DelPostNewReply::class,
- DelPostNewComment::class,
- DelMemberRepeatTopic::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')
- ->everyFiveMinutes()->withoutOverlapping()->appendOutputTo($path);
- $schedule->command('excellent:residents')
- ->dailyAt('00:05')
- ->withoutOverlapping()->appendOutputTo($path);
- $schedule->command('ranking:list')
- ->dailyAt('00:05')
- ->withoutOverlapping()->appendOutputTo($path);
- }
- }
|