mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-04 19:49:16 +00:00
76 lines
2.4 KiB
PHP
76 lines
2.4 KiB
PHP
<?php
|
|
|
|
namespace App\Console;
|
|
|
|
use App\Console\Commands\AutoClearLogs;
|
|
use App\Console\Commands\AutoJob;
|
|
use App\Console\Commands\DailyJob;
|
|
use App\Console\Commands\DailyNodeReport;
|
|
use App\Console\Commands\NodeDailyTrafficStatistics;
|
|
use App\Console\Commands\NodeHourlyTrafficStatistics;
|
|
use App\Console\Commands\NodeStatusDetection;
|
|
use App\Console\Commands\ServiceTimer;
|
|
use App\Console\Commands\UserDailyTrafficStatistics;
|
|
use App\Console\Commands\UserExpireWarning;
|
|
use App\Console\Commands\UserHourlyTrafficMonitoring;
|
|
use App\Console\Commands\UserTrafficWarning;
|
|
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 = [
|
|
AutoClearLogs::class,
|
|
AutoJob::class,
|
|
DailyJob::class,
|
|
DailyNodeReport::class,
|
|
NodeDailyTrafficStatistics::class,
|
|
NodeHourlyTrafficStatistics::class,
|
|
NodeStatusDetection::class,
|
|
ServiceTimer::class,
|
|
UserDailyTrafficStatistics::class,
|
|
UserExpireWarning::class,
|
|
UserHourlyTrafficMonitoring::class,
|
|
UserTrafficWarning::class,
|
|
];
|
|
|
|
/**
|
|
* Define the application's command schedule.
|
|
*
|
|
* @param Schedule $schedule
|
|
* @return void
|
|
*/
|
|
protected function schedule(Schedule $schedule)
|
|
{
|
|
$schedule->command('autoJob')->everyMinute();
|
|
$schedule->command('nodeStatusDetection')->everyTenMinutes();
|
|
$schedule->command('serviceTimer')->everyTenMinutes();
|
|
$schedule->command('autoClearLogs')->everyThirtyMinutes();
|
|
$schedule->command('nodeHourlyTrafficStatistics')->hourly();
|
|
$schedule->command('userHourlyTrafficMonitoring')->hourly();
|
|
$schedule->command('dailyJob')->daily();
|
|
$schedule->command('dailyNodeReport')->dailyAt('09:00');
|
|
$schedule->command('userTrafficWarning')->dailyAt('10:30');
|
|
$schedule->command('userExpireWarning')->dailyAt('20:00');
|
|
$schedule->command('userDailyTrafficStatistics')->dailyAt('23:58');
|
|
$schedule->command('nodeDailyTrafficStatistics')->dailyAt('23:59');
|
|
}
|
|
|
|
/**
|
|
* Register the commands for the application.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function commands()
|
|
{
|
|
$this->load(__DIR__.'/Commands');
|
|
|
|
require base_path('routes/console.php');
|
|
}
|
|
}
|