When a computer is not going to be used for many hours, it is best to shut it down, but sometimes you are not around to do this or you forget because you are busy doing something else.
Automating the shutdown makes use of two features of Windows. One is the shutdown.exe utility, which has an obvious name, but is hidden away in a subfolder of the Windows folder. The other feature is the ability to schedule a task and repeat it every day.
All we need to do is to schedule shutdown.exe to run at whatever time we want to switch off the computer.
In Windows 7 go to Start, All Programs, Accessories, System Tools, Task Scheduler.
In Windows 10 enter Schedule Tasks in the search box in the taskbar and click Schedule Tasks in the results.
When Task Scheduler opens, go to the Actions panel on the right and click Create Basic Task.
Enter a short name for this scheduled task in the Name box and add a longer description below. A description is not essential, but is useful. Click Next at the bottom.
The trigger must now be set and this is when you want Windows to run the scheduled task. Select Daily because we want to shut down the computer automatically every day. Click Next.
The start date and time must be set so that Windows knows when to run the task. The date is set to today by default because usually you want to run scheduled tasks starting immediately. Set the time at which the computer should be shut down and set the task to recur every 1 day. Click Next.
The action is to start a program, so select this in the list.
Which program should Windows run? Click the Browse button and select C:\Windows \System32 \shutdown.exe. This command shuts down the computer.
In the Add arguments (optional) box, enter -s -f which tells the shutdown command to shut down (-s) and force (-f) any programs that are running to quit. Click Next.
That’s it. The task is created and it will run daily at whatever time you set. The shutdown utility will shut down the computer at the specified time. Click Finish.
There is nothing else you need to do and the task runs automatically.
It could be inconvenient if you actually want to use your computer at the time of the scheduled shut down. You could find that documents are closed, software quits and the computer switches off while you are in the middle of doing something important.
In this situation you can disable or delete the shut down task. Select Task Scheduler Library in the left panel to list all the scheduled tasks. Right click the Shut Down task you just created and select Disable or Delete as you prefer.
Now your computer will switch off automatically, saving you electricity, time, and effort. You no longer need to worry about leaving it switched on.