In a previous post, I explained how to schedule a reboot on a Linux server. Today, we will learn how to do exactly the same thing on a Windows server.
The reasons are the same. If your Windows dedicated server has just finished a system update and needs to reboot, you do not want to pull the plug in the middle of the day when your traffic is at its highest. Instead, you should wait until off hours to minimize the number of customers or website visitors who experience down time. While you could stay up all night waiting for that time to arrive, an easier method is to just schedule it.
Like Linux servers, Windows servers have a command line interface that allows you to enter commands remotely. After you have logged into your server and accessed the command prompt, enter the following command:
at 2:00am c:admutilspsshutdown.exe -r -f -c -t 10
In this example, the server will restart at exactly 2:00AM. You will want to make sure your server timezone matches your own (or your customers’) in order to avoid causing the midday reboot you intended to avoid.
As you might be able to tell from the line above, you can use the “at” command for more than just reboots. You can schedule just about any command-line program to run whenever you want. This is just one more way to make your life as a dedicated server admin a lot easier.