Lae/app/Console/Kernel.php

49 lines
1.3 KiB
PHP
Raw Normal View History

2022-08-12 07:56:56 +00:00
<?php
namespace App\Console;
2022-09-13 11:32:58 +00:00
use App\Console\Commands\BanUser;
use App\Console\Commands\SuspendUserAllHosts;
2022-09-08 16:12:02 +00:00
use App\Jobs\HostCost;
2022-09-03 05:22:40 +00:00
use App\Jobs\ClearTasks;
2022-09-03 06:01:51 +00:00
use App\Jobs\DeleteHost;
2022-08-19 09:51:52 +00:00
use App\Jobs\Remote;
2022-08-12 07:56:56 +00:00
use Illuminate\Console\Scheduling\Schedule;
2022-09-08 16:12:02 +00:00
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
2022-08-12 07:56:56 +00:00
class Kernel extends ConsoleKernel
{
2022-09-08 16:12:02 +00:00
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
2022-09-13 11:32:58 +00:00
BanUser::class,
SuspendUserAllHosts::class
2022-09-08 16:12:02 +00:00
];
2022-08-12 07:56:56 +00:00
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
2022-09-08 16:12:02 +00:00
//
2022-08-13 08:37:17 +00:00
// dispatch HostCost job
2022-09-10 03:20:44 +00:00
$schedule->job(new HostCost())->everyFiveMinutes();
2022-08-30 09:20:45 +00:00
// $schedule->job(new UserSave())->everyTenMinutes();
2022-09-07 06:43:28 +00:00
$schedule->job(new Remote\FetchModule())->withoutOverlapping()->everyMinute();
2022-09-06 15:38:56 +00:00
// $schedule->job(new Remote\PushHost())->everyMinute()->onOneServer();
2022-08-19 09:51:52 +00:00
$schedule->job(new Remote\PushWorkOrder())->everyMinute()->onOneServer();
2022-08-13 08:37:17 +00:00
2022-09-03 05:22:40 +00:00
$schedule->job(new ClearTasks())->weekly();
2022-09-03 06:01:51 +00:00
$schedule->job(new DeleteHost())->hourly();
2022-08-12 07:56:56 +00:00
}
}