12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?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);
- }
- }
|