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.
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.