This commit is contained in:
Doar Mihai
2026-04-03 00:29:05 +03:00
parent 9dcf3c36d7
commit 4e6b636787
6 changed files with 525 additions and 0 deletions
+18
View File
@@ -3,6 +3,7 @@
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Console\Scheduling\Schedule;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
@@ -13,6 +14,23 @@ return Application::configure(basePath: dirname(__DIR__))
->withMiddleware(function (Middleware $middleware): void {
//
})
->withSchedule(function (Schedule $schedule): void {
// Fetch jobs from all sources hourly
$schedule->command('jobs:fetch --limit=100')
->hourly()
->withoutOverlapping()
->onOneServer();
// Clean up old jobs daily at 2 AM
$schedule->command('jobs:clean --days=30')
->dailyAt('02:00')
->onOneServer();
// Deduplicate jobs weekly on Sunday at 3 AM
$schedule->command('jobs:deduplicate')
->weeklyOn(0, '03:00')
->onOneServer();
})
->withExceptions(function (Exceptions $exceptions): void {
//
})->create();