info('Running all notification checks...'); $this->info('This will trigger initial scan for all notification types.'); $this->newLine(); $totalCommands = count($this->commands); $successCount = 0; $skipCount = 0; $errorCount = 0; $bar = $this->output->createProgressBar($totalCommands); $bar->start(); foreach ($this->commands as $index => $command) { $bar->advance(); try { $exitCode = $this->call($command); if ($exitCode === 0) { $successCount++; } else { $errorCount++; $this->newLine(); $this->warn("Command '{$command}' returned exit code: {$exitCode}"); } } catch (\Exception $e) { $errorCount++; $this->newLine(); $this->error("Error running '{$command}': " . $e->getMessage()); } } $bar->finish(); $this->newLine(2); // Summary $this->info('=== Summary ==='); $this->line("Total commands: {$totalCommands}"); $this->line("Successful: {$successCount}"); $this->line("Skipped (5 min check): {$skipCount}"); $this->line("Errors: {$errorCount}"); $this->newLine(); if ($errorCount > 0) { $this->warn('Some commands encountered errors. Check logs for details.'); return 1; } $this->info('All notification checks completed successfully!'); $this->info('Scheduler will continue running checks every 5 minutes automatically.'); return 0; } }