Running Laravel scheduled command on specific environments.
// Not goodif (app()->environment('production', 'staging')) { $schedule->command('emails:send') ->daily();}// Better$schedule->command('emails:send') ->daily() ->onEnvironment(['production', 'staging']);
Tip given by @nguyenduy4994