Lae/app/Console/Kernel.php
2022-08-13 16:37:17 +08:00

40 lines
881 B
PHP

<?php
namespace App\Console;
use App\Jobs\HostCost;
use App\Jobs\UserSave;
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();
// dispatch HostCost job
$schedule->job(new HostCost())->everyFiveMinutes();
$schedule->job(new UserSave())->everyTenMinutes();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}