feat: add scan and prune command to schedule

This commit is contained in:
Phan An 2024-03-09 21:08:25 +07:00
parent 6e18bf0d46
commit 343ae32bea

View file

@ -2,6 +2,9 @@
namespace App\Console;
use App\Console\Commands\PruneLibraryCommand;
use App\Console\Commands\ScanCommand;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
@ -10,4 +13,10 @@ class Kernel extends ConsoleKernel
{
$this->load(__DIR__ . '/Commands');
}
protected function schedule(Schedule $schedule): void
{
$schedule->command(ScanCommand::class)->daily();
$schedule->command(PruneLibraryCommand::class)->daily();
}
}