Quick way to schedule restart for Windows Server 2008 R2

This is a very easy task and most of the system admin knows about it. But, it could be a good guide for the beginner. So today I would like to describe a quick way to schedule restart for Windows Server 2008 R2 (It implies in Server 2012/2008/2003 also).

A quick 4 steps will allow you to schedule or plan for starting server on your environment.

1. Open Task Scheduler from Administrative tools. Once you open it you can create a new task:

Step1

2.  You can name the task for your easiness. But in security options, change the user account to Built in\Users (optional).

Step2

3. In next tab “Triggers” , create a new trigger and schedule on your demand as shown in picture :

Step3

4. In tab “Actions” , just provide a action as “Start a program” and then browse it to the shutdown.exe as shown in picture. ” /r ” helps you to restart.

Step4

That’s all. Simple, reliable and easy.

Cheers,

Udhyan.

12 thoughts on “Quick way to schedule restart for Windows Server 2008 R2

  1. Hello, thanks for sharing, I have found it very interesting. Do you know if I can put a constraint not to run this task if another one is still running, in another words I want to control not to automatic restart the server if another task is still running.
    Thanks!

    1. Don,

      In the photos above, you can see a tab called CONDITIONS. Under that tab, you can specify to “Start the task only if the computer is idle” and include a time frame like idle for 30 minutes. You can also specify to wait for a couple hours for the computer to become idle and if it doesn’t it will abort the task until the next scheduled occurrence. Great question….

  2. As shown above, the final step is incorrect. The PROGRAM line should end with shutdown.exe and the /r belongs in the [Add Arguments] box….

    1. You can use /f but your link is a little misinforming. He uses both /f and /t. /t implies a force close and if you want it to be immediate use /t 0 or /f but not both. It becomes redundant.

      1. Never saw anything about “/t” and “/f” being mutually exclusive & redundant except that the help (at least on Windows 7) shows “IF t is > 0, THEN /f is implied.” To me, that says that you should do: shutdown /t 0 /f /r.
        Other than that, I’ve never seen anything say /t /f are mutually exclusive. If so, please point me to it. But I think you may be saying “t 0” = “immediate shutdown,” so “/f” would not be needed in that case – if so, I can buy that.

Leave a comment