Shutter is a portable tool which can automatically shut down (or reboot, log off and more) your PC when your chosen event occurs.
This can just be a simple timer. Set it to 10 minutes, say, select the "Shutdown" action, click Start and the program will begin to count down, turning your system off when it gets to zero.
That's just the start, though. You can also ask the program to activate at a specific time; when your CPU usage drops below a particular level; when a user hasn't been active for a given amount of time; when your battery level drops below a certain figure; when a window closes, or a process stops, and more.
Despite its name, Shutter isn't just about shutting down. You can alternatively have the program sleep or hibernate your system, turn off your monitor, mute or unmute the master volume, play an alarm, and more.
And the Options dialog reveals even more power. You can have the program run specific programs when the defined event occurs, for instance, play a sound, or close named windows. There are lots of ways to fine tune things, including the ability to restart an event when it's been triggered. You even get a web interface to control the program remotely.
Yet all of this comes in a portable program which requires less than 1MB disk space, is free for personal use (commercial users must contact the author for a licence), and supremely easy to operate: just choose and configure a shutdown event, select an action and you're ready to go.
If we go looking for a problem here, then perhaps the fact that it hasn't been updated since 2010 might be a minor concern.
For the most part, though, Shutter is a very capable shutdown tool with a lot of powerful options. Recommended.