diff --git a/app/Console/Commands/Scheduler.php b/app/Console/Commands/Scheduler.php index afd13b9..ca5c903 100644 --- a/app/Console/Commands/Scheduler.php +++ b/app/Console/Commands/Scheduler.php @@ -175,7 +175,7 @@ class Scheduler extends Command } break; case 'Daily': - if (now()->format('H:i') == '13:05') { + if (now()->format('H:i') == '13:03') { \Artisan::call('send:invoice-data-report', [ 'schedule_type' => $rule->schedule_type, 'plant' => $rule->plant, @@ -210,11 +210,25 @@ class Scheduler extends Command } break; case 'Daily': - if (now()->format('H:i') == '11:48') { - \Artisan::call('send:invoice-transit-report', [ - 'schedule_type' => $rule->schedule_type, - 'plant' => $rule->plant, - ]); + if (now()->format('H:i') == '14:58') { + try { + \Artisan::call('send:invoice-transit-report', [ + 'schedule_type' => $rule->schedule_type, + 'plant' => $rule->plant, + ]); + + Log::info('Invoice Transit executed', [ + 'plant' => $rule->plant, + 'type' => $rule->schedule_type, + ]); + } + catch (\Throwable $e) { + Log::error('Invoice Transit FAILED', [ + 'plant' => $rule->plant, + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString(), + ]); + } } break; }