How does Windows Task Scheduler in Win7 recognize a failed task?

后端 未结 4 842
猫巷女王i
猫巷女王i 2020-12-14 16:31

I am working with Windows 7 and I have an application that returns zero (0x0) when successful and one (0x1) on error situations.

I have scheduled this app using Win

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 17:01

    Create a new task and set the custom event query like this:

    
      
        
      
    
    

    Set the trigger advanced settings to Delay the task for a period of time like 15 minutes.

    Configure the action of the new task to start a program:

    Program/script:

    schtasks
    

    Add arguments:

    /Run /TN "\YOUR TASK NAME HERE"
    

    This will schedule the original task to run again 15 minutes after a non-zero result code is logged in the event.

提交回复
热议问题