Being somewhat familiar with schtasks.exe I have decided to use it to control the running of defrag.exe. I've gotten to the point of polishing the features.
My problem is I want to configure the tasks on many machines (13000) programicatically and I need to configure the following settings programically of course.
Don't start the task fi the computer is running on batteries
Stop the task if battery mode begins
Stop the taks if computer ceases to be idle
Stop the task if it runs for <file in the time period>