2023-03-17 15:33:48 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
2023-07-26 14:46:28 +02:00
|
|
|
use App\Jobs\InstanceApplicationsStatusJob;
|
2023-07-14 11:27:08 +02:00
|
|
|
use App\Jobs\CheckResaleLicenseJob;
|
2023-05-25 14:23:49 +02:00
|
|
|
use App\Jobs\InstanceAutoUpdateJob;
|
2023-07-07 15:50:36 +02:00
|
|
|
use App\Jobs\ProxyCheckJob;
|
|
|
|
use App\Jobs\DockerCleanupJob;
|
2023-07-14 11:27:08 +02:00
|
|
|
use App\Jobs\CheckResaleLicenseKeys;
|
2023-03-17 15:33:48 +01:00
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
|
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
{
|
|
|
|
protected function schedule(Schedule $schedule): void
|
|
|
|
{
|
2023-06-16 11:01:27 +02:00
|
|
|
if (isDev()) {
|
2023-06-06 08:43:01 +02:00
|
|
|
$schedule->command('horizon:snapshot')->everyMinute();
|
2023-07-26 14:46:28 +02:00
|
|
|
$schedule->job(new InstanceApplicationsStatusJob)->everyMinute();
|
2023-07-14 13:03:58 +02:00
|
|
|
$schedule->job(new ProxyCheckJob)->everyFiveMinutes();
|
2023-07-14 11:33:08 +02:00
|
|
|
// $schedule->job(new CheckResaleLicenseJob)->hourly();
|
|
|
|
// $schedule->job(new DockerCleanupJob)->everyOddHour();
|
2023-06-15 11:23:48 +02:00
|
|
|
// $schedule->job(new InstanceAutoUpdateJob(true))->everyMinute();
|
2023-06-06 08:43:01 +02:00
|
|
|
} else {
|
|
|
|
$schedule->command('horizon:snapshot')->everyFiveMinutes();
|
2023-07-26 14:46:28 +02:00
|
|
|
$schedule->job(new InstanceApplicationsStatusJob)->everyMinute();
|
2023-07-14 11:33:08 +02:00
|
|
|
$schedule->job(new CheckResaleLicenseJob)->hourly();
|
2023-07-07 15:50:36 +02:00
|
|
|
$schedule->job(new ProxyCheckJob)->everyFiveMinutes();
|
2023-07-07 21:35:29 +02:00
|
|
|
$schedule->job(new DockerCleanupJob)->everyTenMinutes();
|
2023-06-15 11:23:48 +02:00
|
|
|
$schedule->job(new InstanceAutoUpdateJob)->everyTenMinutes();
|
2023-06-06 08:43:01 +02:00
|
|
|
}
|
2023-03-17 15:33:48 +01:00
|
|
|
}
|
|
|
|
protected function commands(): void
|
|
|
|
{
|
2023-04-28 09:00:47 +02:00
|
|
|
$this->load(__DIR__ . '/Commands');
|
2023-03-17 15:33:48 +01:00
|
|
|
|
|
|
|
require base_path('routes/console.php');
|
|
|
|
}
|
2023-07-14 11:27:08 +02:00
|
|
|
}
|