29 September 2011

Setting a timer to shut down the computer, or...

If you are running Windows 7 and want to shut down your computer at a specific time, Windows' Task Scheduler is ideal. In fact it's ideal for any time you want to run a specific task.

To get started, Open your Start Menu and type "task". You should see Task Scheduler appear quickly in the list.


Start it and you'll be presented with this window:

If you think you might want to create more than one regular task, it's probably worth creating a new group so your tasks don't get lost in the mass that get run all the time. To do this, click where it says "Task Scheduler Library" on the left-hand side and on the right you can see an entry for "New Folder...". Click that and choose a good name for your tasks, like... ummm... "My Tasks".

Now, click on your Task Group on the left-hand side, and then on the right click "Create Basic Task...". This will present you with a new window in which you give the task a descriptive name (and an optional description).

Click Next once you have done that and you'll be presented with the Trigger page.

Here you can specify an action that will set your Task in motion and the "When a specific event is logged" option can get quite in-depth, but for now we are just going to specify a time. This computer is on a lot, but I have to get to bed at times, so I shall set a daily task and hit Next again.
This presents me with a timer and you can use Tab to switch between fields and cursor keys to switch between parts of fields (in the time, hitting cursor right switches between hours, minutes and seconds). Enter the time you want to do your task here. For me, I'll change the 16:36:25 to 03:00:00 for 3 AM. Hit Next again.
You are now presented with a choice of things to do, just hit Next here for our task of shutting the machine down.
We want to start the Windows program shutdown.exe so we'll type:

C:\Windows\System32\shutdown.exe
in the Program/script field. In the Add arguments field we're going to also put in /s that tells shutdown.exe that we want to shut the computer down (shutdown.exe can do a lot of other things).

When you hit Next now you are presented with a recap of the task you have created and you can hit Back to make any changes you'd like, or hit Finish to set your task going. If my time of 3 AM doesn't suit you, you can always go back and change it at a later date.