Added schema line in console.php
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Successful in 1m19s
Laravel Larastan / larastan (pull_request) Failing after 5m15s
Laravel Pint / pint (pull_request) Failing after 2m33s

This commit is contained in:
dhanabalan
2025-11-25 17:22:33 +05:30
parent d7b6e8c111
commit 346aaf1438

View File

@@ -4,6 +4,7 @@ use App\Models\AlertMailRule;
use Illuminate\Foundation\Inspiring; use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use Illuminate\Console\Scheduling\Schedule; use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Support\Facades\Schema;
Artisan::command('inspire', function () { Artisan::command('inspire', function () {
$this->comment(Inspiring::quote()); $this->comment(Inspiring::quote());
@@ -20,6 +21,8 @@ Artisan::command('inspire', function () {
//$schedule->command('report:send-daily-production')->dailyAt('07:59'); //$schedule->command('report:send-daily-production')->dailyAt('07:59');
if (Schema::hasTable('alert_mail_rules')) {
//Production report scheduling //Production report scheduling
$productionRules = AlertMailRule::where('module', 'ProductionQuantities') $productionRules = AlertMailRule::where('module', 'ProductionQuantities')
->where('rule_name', 'ProductionMail') ->where('rule_name', 'ProductionMail')
@@ -31,8 +34,8 @@ Artisan::command('inspire', function () {
$type = $rule->schedule_type; $type = $rule->schedule_type;
$plantId = $rule->plant; $plantId = $rule->plant;
$command = $schedule->command('send:production-report', [$type, $plantId]) $command = $schedule->command('send:production-report', [$type, $plantId]);
->appendOutputTo(storage_path('logs/scheduler.log')); //->appendOutputTo(storage_path('logs/scheduler.log'));
switch ($type) { switch ($type) {
case 'Live': case 'Live':
@@ -72,7 +75,7 @@ Artisan::command('inspire', function () {
} }
} }
//Invoice Data report scheduling //Invoice Data Report Scheduling
$invoiceDataRules = AlertMailRule::where('module', 'InvoiceDataReport') $invoiceDataRules = AlertMailRule::where('module', 'InvoiceDataReport')
->select('plant', 'schedule_type') ->select('plant', 'schedule_type')
->distinct() ->distinct()
@@ -96,6 +99,7 @@ Artisan::command('inspire', function () {
break; break;
} }
} }
}
}); });