Laravel - Task Scheduling - Environment Constraints

The environments method may be used to execute tasks only on the given environments (as defined by the APP_ENV environment variable):

    
    $schedule->command('emails:send')
                ->daily()
                ->environments(['staging', 'production']);