1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- namespace App\Console;
- use App\Console\Commands\AutoClearLog;
- use App\Console\Commands\AutoJob;
- use App\Console\Commands\AutoReportNode;
- use App\Console\Commands\AutoStatisticsNodeDailyTraffic;
- use App\Console\Commands\AutoStatisticsNodeHourlyTraffic;
- use App\Console\Commands\AutoStatisticsUserDailyTraffic;
- use App\Console\Commands\AutoStatisticsUserHourlyTraffic;
- use App\Console\Commands\DailyJob;
- use App\Console\Commands\NodeStatusDetection;
- use App\Console\Commands\ServiceTimer;
- use App\Console\Commands\UserExpireAutoWarning;
- use App\Console\Commands\UserFree;
- use App\Console\Commands\UserTrafficAbnormalAutoWarning;
- use App\Console\Commands\UserTrafficAutoWarning;
- 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 = [
- AutoClearLog::class,
- AutoJob::class,
- AutoReportNode::class,
- AutoStatisticsNodeDailyTraffic::class,
- AutoStatisticsNodeHourlyTraffic::class,
- AutoStatisticsUserDailyTraffic::class,
- AutoStatisticsUserHourlyTraffic::class,
- DailyJob::class,
- NodeStatusDetection::class,
- ServiceTimer::class,
- UserExpireAutoWarning::class,
- UserTrafficAbnormalAutoWarning::class,
- UserTrafficAutoWarning::class,
- UserFree::class
- ];
- /**
- * Define the application's command schedule.
- *
- * @param Schedule $schedule
- * @return void
- */
- protected function schedule(Schedule $schedule)
- {
- $schedule->command('autoJob')->everyMinute();
- $schedule->command('serviceTimer')->everyTenMinutes();
- $schedule->command('autoClearLog')->everyThirtyMinutes();
- $schedule->command('nodeStatusDetection')->everyTenMinutes();
- $schedule->command('autoStatisticsNodeHourlyTraffic')->hourly();
- $schedule->command('autoStatisticsUserHourlyTraffic')->hourly();
- $schedule->command('userTrafficAbnormalAutoWarning')->hourly();
- $schedule->command('dailyJob')->everyFiveMinutes();
- $schedule->command('autoReportNode')->dailyAt('09:00');
- $schedule->command('userTrafficAutoWarning')->dailyAt('10:30');
- $schedule->command('userExpireAutoWarning')->dailyAt('20:00');
- $schedule->command('autoStatisticsUserDailyTraffic')->dailyAt('23:55');
- $schedule->command('autoStatisticsNodeDailyTraffic')->dailyAt('23:57');
- }
- /**
- * Register the commands for the application.
- *
- * @return void
- */
- protected function commands()
- {
- $this->load(__DIR__.'/Commands');
- require base_path('routes/console.php');
- }
- }
|