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