Lae/app/Console/Kernel.php

40 lines
881 B
PHP
Raw Normal View History

2022-08-12 07:56:56 +00:00
<?php
namespace App\Console;
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-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');
}
}