If your computer needs to restart to finish installing an update, you can schedule when that happens by going into Windows Update and choosing Schedule the Restart. You can also use Windows Task Scheduler to create an automated task that restarts the machine. Open the app, choose Create Basic Task, and follow the on-screen instructions to set it up.