Go to command line and run gpedit.msc
Then go to Computer Configuration -> Administrative Templates -> Windows Components -> Windows Updates
Then enable always “automatically restart at a scheduled time”.
And “configure automatic updates” should be set to #4 (See screenshot)