Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a configuration for scheduled tasks to run only when the computer is shut down or more likely prevent a task from running if it hasn't been booted up to run the task? I'd like to run all my system maintenance when I know for sure that no one is using the machine and using configurations dependent on the computers idle isn't meeting my needs.

share|improve this question
3  
How would you run a task if the computer is shut down? Do you mean you'd want the task to also boot up the machine and then start it. If so, why not leave the computer on, set the task for 1am or similar? –  Dave Rook Sep 11 '12 at 13:20
add comment

1 Answer

There is a StackOverflow post that might help you.

The solution from that post is to launch gpedit.msc (local Policies)

Windows settings -> Scripts -> Shutdown -> Properties -> Add

This will run a script that you provide when the machine is being shut down.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.