XP has the command tool shutdown.exe built in, so it is quite easy.
There are a couple of ways to do it, here's mine.
Open up a new text document, and paste this in
shutdown -s -f
Rename the text document ScheduleShutdown.bat
Place the .bat file in the root of your C: drive
Go to Start>All Programs>Accessories>System Tools>Scheduled Tasks
Click "Add Scheduled Task", then click Next
Click the Browse button, and select the file ScheduleShutdown.bat
Click next, then set when and how often you want the task to take place.