Without 3rd party tools
You can read this article on How to : Schedule Computer Shutdown After Specific Period of Time if you don't want to use third party software. Also MS Support will help you regarding this.
You can create a batch file like this
shutdown /s /f /t 600 /c "Your system will shutdown in 10 minutes"
And save it with the name of
shutdown.bat and put it on desktop to launch it.
Now for aborting it you can use this command
Shutdown through Batch file with prompt and abort operation
SHUTDOWN /S /F /T 600
SET /P continue="Your computer is about to shutdown in 10 min do you want to abort (y/n): "
IF %continue% EQU y (
TIMEOUT /T 600 /NOBREAK
Now save it with the name of your choice with the
.bat extension. And now whenever you want to run it use the right clcik on it and choose
Run as Admin option and it will prompt you to abort the operation if you want to abort enter the input
Y and hit Enter shutdown operation will abort for 10 min and it will ask you agsin after 10 min until you don't shut it down.
Using 3rd party tool
I will recommend you the Autoshutdown which is free and quite helpful.
Auto Shutdown is a simple utility that allows users to schedule times for their computers to shut down or restart automatically. It's nothing fancy, but it's easy to use, and the scheduling is surprisingly customizable.
You can also use SwitchOff tool for this.
This handy program is a PC timer that can shut down, log off, or force your computer to hibernate. It works either as a countdown timer, or set up like an alarm clock. When the proper time is reached, SwitchOff shuts down all open applications and performs its task. You can configure it to operate daily, weekly, or for a single occurrence.
TimeComX is another recommended one you can use for shutdown, restart, log off etc.