changed logic inside the schduler
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 9s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 15s
Laravel Pint / pint (pull_request) Successful in 2m19s
Laravel Larastan / larastan (pull_request) Failing after 3m30s

This commit is contained in:
dhanabalan
2026-01-21 16:16:10 +05:30
parent 2e2c3f6f18
commit 52ac6157bc

View File

@@ -210,25 +210,35 @@ class Scheduler extends Command
} }
break; break;
case 'Daily': case 'Daily':
if (now()->format('H:i') == '16:06') { // if (now()->format('H:i') == '16:06') {
try { // try {
\Artisan::call('send:invoice-transit-report', [ // \Artisan::call('send:invoice-transit-report', [
'schedule_type' => $rule->schedule_type, // 'schedule_type' => $rule->schedule_type,
'plant' => $rule->plant, // 'plant' => $rule->plant,
]); // ]);
Log::info('Invoice Transit executed', [ // Log::info('Invoice Transit executed', [
'plant' => $rule->plant, // 'plant' => $rule->plant,
'type' => $rule->schedule_type, // 'type' => $rule->schedule_type,
]); // ]);
} // }
catch (\Throwable $e) { // catch (\Throwable $e) {
Log::error('Invoice Transit FAILED', [ // Log::error('Invoice Transit FAILED', [
'plant' => $rule->plant, // 'plant' => $rule->plant,
'error' => $e->getMessage(), // 'error' => $e->getMessage(),
'trace' => $e->getTraceAsString(), // 'trace' => $e->getTraceAsString(),
]); // ]);
} // }
// }
$now = now();
if ($now->between(
$now->copy()->setTime(16, 17, 0),
$now->copy()->setTime(16, 18, 0)
)) {
Artisan::call('send:invoice-transit-report', [
'schedule_type' => $rule->schedule_type,
'plant' => $rule->plant,
]);
} }
break; break;
} }