diff --git a/app/Console/Commands/ReportReminder.php b/app/Console/Commands/ReportCache.php similarity index 82% rename from app/Console/Commands/ReportReminder.php rename to app/Console/Commands/ReportCache.php index ba858824d..759d1b5a9 100644 --- a/app/Console/Commands/ReportReminder.php +++ b/app/Console/Commands/ReportCache.php @@ -8,21 +8,21 @@ use App\Utilities\Reports as Utility; use Illuminate\Console\Command; use Illuminate\Support\Facades\Cache; -class ReportReminder extends Command +class ReportCache extends Command { /** * The name and signature of the console command. * * @var string */ - protected $signature = 'reminder:report'; + protected $signature = 'report:cache'; /** * The console command description. * * @var string */ - protected $description = 'Calculate reminders for reports'; + protected $description = 'Calculate and cache reports'; /** * Execute the console command. @@ -43,18 +43,18 @@ class ReportReminder extends Command continue; } - $this->info('Calculate report reminders for ' . $company->name . ' company.'); + $this->info('Calculating reports for ' . $company->name . ' company.'); // Set company $company->makeCurrent(); - $this->remind(); + $this->cacheReportsOfCurrentCompany(); } Company::forgetCurrent(); } - protected function remind() + protected function cacheReportsOfCurrentCompany() { $reports = Report::orderBy('name')->get(); diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 17d8ce4aa..aaf88ec16 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -29,7 +29,7 @@ class Kernel extends ConsoleKernel $schedule_time = config('app.schedule_time'); - $schedule->command('reminder:report')->everySixHours(); + $schedule->command('report:cache')->everySixHours(); $schedule->command('reminder:invoice')->dailyAt($schedule_time); $schedule->command('reminder:bill')->dailyAt($schedule_time); $schedule->command('recurring:check')->dailyAt($schedule_time);