getCleanupInterval(); $schedule->command('cleanup:orphaned-videos --force') ->cron("*/{$interval} * * * *") ->withoutOverlapping() ->runInBackground(); } /** * Register the commands for the application. */ protected function commands(): void { $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } /** * Get the interval in minutes for cleanup (from .env) */ protected function getCleanupInterval(): int { return (int) env('CLEANUP_INTERVAL_MINUTES', 30); } }