Why Shut the Computer Down Later?
I have my computer set to defragment itself at 2am but I don’t want it running all night! So, I wrote a batch file that will shutdown the computer and set a Scheduled Task (in the Control Panel) to run the file at 3am.
How To Use The Task Scheduler To Shut the Computer Down At A Later Time
shutdown -s -t 60
I set the “-t” switch just in case I am on the computer and need to cancel it (I shouldn’t be on it at 3am, but you never know). At this point, you should test the file to make sure it’s working.
Save the file, I prefer to save my batch files in the Programs Files folder in the c:\ drive. They are program after all!
Schedule The Task
- Navigate to: Control Panel -> Scheduled Tasks -> Add Scheduled Task
- Hit Next in the dialog box that opens.
- In the second screen, navigate to the location of the file.
- We’ll set this to only run one time, we can change this later (in the Advanced Properties) if we want.
- Enter the time and date you want it to run.
- In the next screen, enter in the user name and the password.
- Hit Finish and you’re done!
You can go into the Advanced Properties, but you don’t really need to.