ldc-boutique-cnc/app/Console/Kernel.php
2023-03-09 11:58:41 +01:00

59 lines
1.8 KiB
PHP

<?php
namespace App\Console;
use App\Jobs\DeleteOlds\DeleteOldCollectionException;
use App\Jobs\DeleteOlds\DeleteOldCustomers;
use App\Jobs\DeleteOlds\DeleteOldOrders;
use App\Jobs\DeleteOlds\DeleteOldTimeslots;
use App\Jobs\ProductsOrderableUpdate;
use App\Jobs\ProductsStatusUpdate;
use App\Jobs\SlidesStatusUpdate;
use App\Jobs\XmlIncoReader as JobsXmlIncoReader;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// * Update models planified booleans changes
$schedule->job(SlidesStatusUpdate::class)->everyMinute();
$schedule->job(ProductsStatusUpdate::class)->everyMinute();
$schedule->job(ProductsOrderableUpdate::class)->everyMinute();
$schedule->command('sitemap:refresh')->dailyAt('16:13');
$schedule->job(JobsXmlIncoReader::class)->name('xml-inco-reader')->onOneServer()->dailyAt('15:00');
$schedule->job(DeleteOldOrders::class)->dailyAt('23:00');
$schedule->job(DeleteOldCustomers::class)->dailyAt('22:50');
$schedule->job(DeleteOldCollectionException::class)->dailyAt('10:42');
$schedule->job(DeleteOldTimeslots::class)->everyMinute();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}