2022-08-12 07:56:56 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
2022-08-19 09:51:52 +00:00
|
|
|
use App\Jobs\Remote;
|
2022-08-13 08:37:17 +00:00
|
|
|
use App\Jobs\HostCost;
|
|
|
|
use App\Jobs\UserSave;
|
2022-08-12 07:56:56 +00:00
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
|
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Define the application's command schedule.
|
|
|
|
*
|
|
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
protected function schedule(Schedule $schedule)
|
|
|
|
{
|
|
|
|
// $schedule->command('inspire')->hourly();
|
2022-08-13 08:37:17 +00:00
|
|
|
|
|
|
|
// dispatch HostCost job
|
|
|
|
$schedule->job(new HostCost())->everyFiveMinutes();
|
|
|
|
$schedule->job(new UserSave())->everyTenMinutes();
|
2022-08-19 09:51:52 +00:00
|
|
|
$schedule->job(new Remote\FetchModule())->everyMinute()->onOneServer();
|
|
|
|
$schedule->job(new Remote\PushHost())->everyMinute()->onOneServer();
|
|
|
|
$schedule->job(new Remote\PushWorkOrder())->everyMinute()->onOneServer();
|
2022-08-13 08:37:17 +00:00
|
|
|
|
2022-08-12 07:56:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register the commands for the application.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
protected function commands()
|
|
|
|
{
|
|
|
|
$this->load(__DIR__.'/Commands');
|
|
|
|
|
|
|
|
require base_path('routes/console.php');
|
|
|
|
}
|
|
|
|
}
|