Windows 10

How to Schedule Restart in Windows 10

In this tutorial, we are going to see how to schedule restart in windows 10 using the Run command window, or via a simple program that you will create yourself.
 

Schedule Restart using Run Command

There is a DOS command on Windows called “shutdown” with attributes such as “-t”, “-s” or “-r” allowing respectively to execute the command after t seconds, to stop it or to restart it.

To restart the computer after X seconds, here is the command to follow:

shutdown -r -t X


 

 

Cancel the schedule

To cancel the schedule, simply execute this command:

shutdown -a


 
 

Schedule Restart Using a “.cmd” Program.

All you have to do is open a new Notepad file.
 

 

 
Then paste this code below.

@Echo off
GOTO MENU

:MENU
Echo !! ------------------------------------ !!
Echo !!   System reboot management        !!
Echo !! ------------------------------------ !!
Echo 1 - Schedule system reboot...
Echo 2 - Cancel the schedule
Echo !! ------------------------------------ !!
SET /p Action=Your choice (1 or 2) :

IF %Action% == 1 GOTO RestartSchedule
IF %Action% == 2 GOTO CancelSchedule
IF %Action% GTR 2 GOTO WrongValue

:CancelSchedule
shutdown -a
Echo Schedule Cancelled
Goto Fin

:RestartSchedule
Echo !! Info : 1 heure = 3600 secondes !!
SET /p Secondes= Seconds before system reboot :
IF '%Secondes%' == '' GOTO RestartSchedule
shutdown -r -t %Secondes%
GOTO Fin


:WrongValue
CLS
Echo !!! Warning : Incorrect value entered !!!
GOTO Menu

:Fin

You only have to save the file with the extension “.cmd”.

Double-click to run the “.cmd” file program.
 

 
When you will execute the program you will have a window like this one:
 

 

 

Schedule Restart Using a Shortcut

Create a shortcut on the desktop to schedule the reboot. Right click on the desktop and then select : New > Shortcut
 

 
Copy and paste the following command. Here 3600 secondes = 1 heure

%SystemRoot%\System32\shutdown.exe -f -s -t 3600


 

 
Chose a name for the shortcut.
 

 
Here is an executable shortcut that you can modify at any time via the contextual menu (Right click then Properties)
 

 

Leave a Reply

Your email address will not be published. Required fields are marked *