Shut down your computer at a certain time
You can automatically shut down your computer at a certain time without the need of any additional software. These single line commands can help you shut down, restart and hibernate your PC after a specified time.
These tips are extremely handy if you listen music or download files at night and falls asleep without shutting down your pc.
Press WIN + R key and type CMD, press enter to open command prompt
xxx is time in seconds like 3600 for 1 hour
For Full Shutdown
shutdown /s /t xxx
For Hybrid Shutdown[Fast Start up] Windows 8 onwards
shutdown /s /hybrid /t xxx
shutdown /r /t xxx
To Abort any of above tasks
ping -n 20 127.0.0.1 > NUL 2>&1 && shutdown /h /f
Note: for hibernation commands to work leave the cmd window open and uninterrupted to abort hibernation press CTRL+C on that window