If you've avoided setting up a power-saving shutdown script because you don't like the idea of shutting down the computer at a fixed time, this simple setup using Windows Task Scheduler combines a scheduled shutdown with a recurring idleness check.
Computer tips and tricks blog How-To Geek shares a simple Task Scheduler tweak for setting up automatic but not time-absolute shutdown routine. You create a task to shutdown (or hibernate) your computer, triggered after a certain time but dependent on idleness. The secret sauce is tweaking the routine to run itself every 30 minutes if interrupted. This way, if you set the shutdown process to start at 10pm but are still on the computer working, it will check for idleness again in another half hour.
Check out the full guide with step-by-step instructions and a detailed walk through at the link below.
Republished from Lifehacker.