There is an inbuilt option in Windows to schedule the shutdown or logoff time of your computer. Go to Start Menu->Run-> and type "CMD" to switch to Command prompt.
Type "Shutdown /?" without quotes. It will give lot of option for the shutdown task.
Type "Shutdown /s" and press enter to shutdown immediate.
Type "Shutdown /l" and press enter to logoff the system
For schedule shutdown Type "Shutdown /t 30" and press enter to shutdown the system after 30seconds (you can change the time range from 0-600 seconds.
There are several softwares available to schedule the time of the system shutdown. Download and try one of the following software.
For Vista Users:
http://www.vistashutdowntimer.toflo.de/Download/Vista-ShutdownTimer.exe (Good & Recommended)
Please ask your questions and doubts about this thread by Leaving Your Comments (No SignUp Required) to enable me to clear all. Please click the below "Comments" link to do so.