Running Laravel scheduled command on specific environments.
1// Not good2if (app()->environment('production', 'staging')) {3 $schedule->command('emails:send')4 ->daily();5}6// Better7$schedule->command('emails:send')8 ->daily()9 ->onEnvironment(['production', 'staging']);
Tip given by @nguyenduy4994