phase 3
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user