1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-23 01:22:30 +01:00
Pterodactyl-Panel/app/Console/Kernel.php
Dane Everitt 176d92176e
Run tasks every minute as needed
Clear logs every month (configurable) for old tasks logs.
2016-10-21 16:36:40 -04:00

38 lines
1.1 KiB
PHP

<?php
namespace Pterodactyl\Console;
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 = [
\Pterodactyl\Console\Commands\Inspire::class,
\Pterodactyl\Console\Commands\MakeUser::class,
\Pterodactyl\Console\Commands\ShowVersion::class,
\Pterodactyl\Console\Commands\UpdateEnvironment::class,
\Pterodactyl\Console\Commands\RunTasks::class,
\Pterodactyl\Console\Commands\ClearTasks::class,
\Pterodactyl\Console\Commands\ClearServices::class,
\Pterodactyl\Console\Commands\UpdateEmailSettings::class,
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('pterodactyl:tasks')->everyMinute()->withoutOverlapping();
$schedule->command('pterodactyl:tasks:clearlog')->twiceDaily(3, 15);
}
}