2019-05-09 15:00:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
|
2022-03-25 12:41:00 +01:00
|
|
|
use App\Console\Commands\ArcadiaLinkCommand;
|
|
|
|
|
use App\Jobs\Arcadia\XmlArcadiaMediasIn;
|
2019-05-09 15:00:05 +02:00
|
|
|
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 = [
|
2022-03-25 12:41:00 +01:00
|
|
|
ArcadiaLinkCommand::class
|
2019-05-09 15:00:05 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the application's command schedule.
|
|
|
|
|
*
|
2022-03-25 12:41:00 +01:00
|
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
2019-05-09 15:00:05 +02:00
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function schedule(Schedule $schedule)
|
|
|
|
|
{
|
2022-03-25 12:41:00 +01:00
|
|
|
$schedule->job(XmlArcadiaMediasIn::class)->name('arcadia_medias_in')
|
|
|
|
|
->onOneServer()->cron('*/2 * * * *');
|
2019-05-09 15:00:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register the commands for the application.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function commands()
|
|
|
|
|
{
|
2022-03-25 12:41:00 +01:00
|
|
|
$this->load(__DIR__ . '/Commands');
|
2019-05-09 15:00:05 +02:00
|
|
|
|
|
|
|
|
require base_path('routes/console.php');
|
|
|
|
|
}
|
|
|
|
|
}
|