Recently I wanted to schedule a defragment and saw the advanced option to not start if something was running, However after picking a game in the steam directory and setting the time. The action command that was added to the Task Scheduler is not a valid location. It says something like "C:\Program Files (x86)\Steam\steamapps\common\Borderlands 2\Binaries\Win32\df64.exe".
The settings were set to daily at 10pm, Defrag if 5% or greater, Stop at 72 hours, Defrag if idle for 5 minutes, Do not start if.. "borderlands2" running.