If you never knew that you could place auto-shutdown in Windows then you might like this article. Basically, Windows has integrated command-line interpreter (AKA CMD) that can do various things for you. If you have never used CMD then read the next part. Otherwise, you can just jump to the command section below.
STARTING CMD
To start CMD you need to press the 'WINDOWS + R' combination and a Run window will appear. Here type 'cmd.exe' and the window should pop up.
THE SHUTDOWN COMMAND
If you simply want to shutdown your computer for a certain time, you can use the following command as a reference:
shutdown -s -t 60
In the command above, I set a scheduled shutdown after 60 seconds. The time you will write is always in seconds.
If you want to restart instead of shutdown, you can use -r instead of -s:
shutdown -r -t 60
And lastly, to abort a scheduled shutdown you can use the command
shutdown -a