In a Windows machine there is a command to shutdown a computer after certain time interval.
For example, if you want to shut down your computer after an hour you can give a command in the command windows:
"shutdown -s -t 3600"
-s for shutdown
-r for restart
-t for time
In Windows XP the procedure is:
1. Start –> Run
2. Type the command with the time in seconds
3. Let the computer shut down
There is another option to schedule shutdown by Task Scheduler in the Control Panel.