2023-03-14 14:33:06 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
2023-05-14 07:42:18 +00:00
|
|
|
use App\Http\Controllers\Admin\ServerController;
|
2023-03-14 14:33:06 +00:00
|
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
|
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Define the application's command schedule.
|
|
|
|
*/
|
|
|
|
protected function schedule(Schedule $schedule): void
|
|
|
|
{
|
2023-05-14 07:42:18 +00:00
|
|
|
$schedule->call(function () {
|
|
|
|
(new ServerController())->checkServer();
|
|
|
|
})->everyMinute()->name('FrpServer')->withoutOverlapping()->onOneServer();
|
|
|
|
|
|
|
|
// $schedule->job(new Cost())->hourly()->name('FrpServerCost')->withoutOverlapping()->onOneServer();
|
|
|
|
|
|
|
|
// every three days
|
|
|
|
// $schedule->job(new ReviewWebsiteJob())->daily()->name('reviewWebsiteJob')->withoutOverlapping()->onOneServer();
|
|
|
|
|
2023-03-14 14:33:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register the commands for the application.
|
|
|
|
*/
|
|
|
|
protected function commands(): void
|
|
|
|
{
|
2023-03-15 13:42:40 +00:00
|
|
|
$this->load(__DIR__ . '/Commands');
|
2023-03-14 14:33:06 +00:00
|
|
|
|
|
|
|
require base_path('routes/console.php');
|
|
|
|
}
|
|
|
|
}
|