Setting up time to shutdown your computer using at command

Ever wondered if you could use timer to turnoff the computer? Yes you can. Though there are many software?s to do that work you can do the shutdown using few lines of command at the command prompt itself. At command is very helpful at scheduling the different task that can be executed by the help of it.

I find the at command very helpful at night when I am watching movie on the computer and fell asleep. You can play songs on your media player and set a clock to shutdown after one hour when you are asleep. Also you can set time when you are downloading file which will take, say 30 minutes to download, then you can set the computer to shutdown at 40 minutes.

Here?s what you need to do to shutdown your computer at your desired time.

at hh:mm shutdown -s -f

You need to enter the time in 24 hours format. The /f uses the force shutdown. You can set the time before shutdown by adding /t xxx to the shutdown command. Enter the value in seconds instead of xxx. For 10 seconds delay use /t 10

eg:

To? force shutdown you computer at 11PM type

at 23:00 shutdown -s -f

To? force shutdown you computer at 11PM? with 10 seconds delay before shutdown type

at 23:00 shutdown -s -f -t 10

If you like to hibernate instead of shutdown you can try

at hh:mm shutdown -h

If you have problem executing the cmd in vista or windows 7 run the command prompt with administrative privileges. Right click the cmd prompt and click run as administrator.

You can get more help about the at command from the Microsoft support site.

You can tweak the command to do other tasks as well. Have fun experimenting with it.Winking smile

%d bloggers like this: