How to Schedule a reboot of Windows Server

If you are looking for the good old AT command on Windows 8, Windows Server 2012 or newer OS, you will notice that the command has been deprecated. Instead you should check out the schtasks.exe command line tool, that also is a pretty powerful tool.

The need for scheduling a reboot of a server

There can be many reasons why you will need to schedule a restart of a server instead of just rebooting it right away. Most of the time it is because it is being used and you have to wait for a maintenance windows to perform the task. Often I have needed to schedule a server reboot or a Windows Service restart and I have been using the good old AT command for this task in many years. However, in newer OS starting with Windows 8/Windows Server 2012 the AT command is not working anymore. The new command to do those kind of tasks now, is the schtasks.exe command line tool. If you try to run the AT command on a newer operating systems, you will get the message below:


How to schedule a server restart with schtasks.exe

Ok, let’s have a look on the schtasks command. To schedule a server restart you should run the following command line:

schtasks /create /sc once /tn Reboot /tr “shutdown – r -f “”restart””” /st 22:00

This command will create a scheduled task that will run once at 22:00 and execute a forced reboot of the server/computer you have created the task on. If you prefer to use the graphic user interface to check up on your newly created task or to change the time it will run, you can use the Windows Task scheduler. You can of cause also remove a task with schtasks, like in the example below:

schtasks /delete /TN “reboot”

The smart thing about scripting this command instead of using the Task scheduler GUI is that you can run other command line tools first and then finish with a server reboot then the task is done, but you can of cause also use the Task Scheduler GUI if you are more comfortable using that.

Shutdown task

Final thoughts

I hope you found what you were looking for in this post. If you have any questions, please drop me a comment below.


About the author:
I am an IT Professional that has this blog as a hobby project in my spare time. I have been in the IT business since 1996 and want to share some of the thing I have picked up over the years, with people who visit this blog.

>>Subscribe to my Newsletter<<

4 Responses to How to Schedule a reboot of Windows Server

  1. Jack Vaniyo says:

    I wasn’t aware of the new change in Windows 10 abs server 2008. I often use software instead of command line instructions for my routine task. Probably, the command line prompt is not my cup of tea.

    Thanks for the guide anyway. It should come in handy when everything else fails

    • Thomas says:

      Hi Jack

      I know the command line can be a bit scary if you don’t use it regular. There is a lot of GUI you can use instead if that is easier for you. I do love performing such tasks from the command line myself.

  2. Atish Ranjan says:


    Awesome. Too technical. Love to read such kind of stuff.

  3. Now generally, I am quite inactive in using the CMD Comand Prompt because as I have seen that it involves quite a complications but with your given guide I was able to follow it thoroughly … to schedule reboot my Windows server.

Leave a Reply

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