comment(Inspiring::quote()); })->purpose('Display an inspiring quote'); // Schedule the new commands instead of closures Schedule::command('emails:fetch')->everyMinute(); Schedule::command('attachments:clean')->daily(); Schedule::command('mailbox:clean')->everyTwoHours(); // Keep other necessary schedules Schedule::call(function (): void { Email::deleteMessagesFromDB(); })->everyTwoHours(); Schedule::call(function (): void { Log::deleteLogsFromDB(); })->everyThreeHours(); // Preserve existing commands Artisan::command('cleanMail', function (): void { $this->comment(Email::cleanMailbox()); }); Artisan::command('closeTicket', function (): void { $this->comment(Ticket::autoClose()); });