withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', commands: __DIR__.'/../routes/console.php', health: '/up', ) ->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();