Browse Source

集計をスケジュール登録

develop
sosuke.iwabuchi 2 years ago
parent
commit
667dbd9dd7
2 changed files with 21 additions and 0 deletions
  1. +1
    -0
      app/Console/Kernel.php
  2. +20
    -0
      app/Console/Schedules/SummaryUse.php

+ 1
- 0
app/Console/Kernel.php View File

@@ -14,6 +14,7 @@ class Kernel extends ConsoleKernel
{ {
Schedules\HeartBeat::register($schedule); Schedules\HeartBeat::register($schedule);
Schedules\PollSMSSendOrder::register($schedule); Schedules\PollSMSSendOrder::register($schedule);
Schedules\SummaryUse::register($schedule);
} }


/** /**


+ 20
- 0
app/Console/Schedules/SummaryUse.php View File

@@ -0,0 +1,20 @@
<?php

namespace App\Console\Schedules;

use App\Console\Commands\SummaryUse as Command;
use Illuminate\Console\Scheduling\Schedule;

class SummaryUse extends BaseSchedule
{

static public function register(Schedule $schedule)
{
$schedule->command(Command::class, ['--current'])
->everyTenMinutes()
->description("利用集計(当月)");
$schedule->command(Command::class)
->monthlyOn(5)
->description("利用集計(前月)");
}
}

Loading…
Cancel
Save