title: How does Windows Task Scheduler in Win7 recognize a failed task?
body: <p>I am working with Windows 7 and I have an application that returns zero (0x0) when successful and one (0x1) on error situations. </p>
  
  <p>I have scheduled this app using Windows Task Scheduler. I have checked the option boxes "If the task fails, restart every" and "Attempt to restart up to:".</p>
  
  <p>I thought that a non-zero return code from the app would be enough to trigger the task to be restarted after the given interval. But nothing happens.</p>
  
  <p>Any ideas what could be the issue? I tried to google it but did not found anything relevant.</p>