30 lines
927 B
PHP
30 lines
927 B
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Console\ClosureCommand;
|
|
use Illuminate\Foundation\Inspiring;
|
|
use Illuminate\Support\Facades\Artisan;
|
|
use Illuminate\Support\Facades\Schedule;
|
|
|
|
// Reporte de ventas semanal
|
|
Schedule::command('reporte:ventas')->daily();
|
|
|
|
/* // Verificación de alertas de stock - ejecutar cada 6 horas
|
|
Schedule::command('stock:verificar-alertas')
|
|
->everySixHours()
|
|
->withoutOverlapping()
|
|
->onFailure(function () {
|
|
\Illuminate\Support\Facades\Log::error('Error al ejecutar verificación de alertas de stock');
|
|
});
|
|
*/
|
|
// También ejecutar al inicio del día laboral
|
|
Schedule::command('stock:verificar-alertas')
|
|
->dailyAt('08:00')
|
|
->withoutOverlapping()
|
|
->description('Verificación matutina de niveles de stock');
|
|
|
|
|
|
Artisan::command('inspire', function () {
|
|
/** @var ClosureCommand $this */
|
|
$this->comment(Inspiring::quote());
|
|
})->purpose('Display an inspiring quote');
|