ldc-boutique-cnc/app/Console/Kernel.php
2023-05-16 18:41:30 +02:00

63 lines
2.1 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\DiscountsStatusUpdate;
use App\Jobs\Payment\SystempayCreditTransactionUpdate;
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->job(DiscountsStatusUpdate::class)->everyMinute();
$schedule->job(DeleteOldTimeslots::class)->everyMinute();
$schedule->command('model:prune')->everyMinute();
$schedule->command('sitemap:refresh')->dailyAt('16:13');
$schedule->job(JobsXmlIncoReader::class)->name('xml-inco-reader')->onOneServer()->dailyAt('15:00');
$schedule->job(DeleteOldCustomers::class)->dailyAt('22:50');
$schedule->job(DeleteOldOrders::class)->dailyAt('23:00');
$schedule->job(DeleteOldCollectionException::class)->dailyAt('10:42');
$schedule->job(SystempayCreditTransactionUpdate::class)->dailyAt('03:00');
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}