I am facing a strange problem. I have scheduled a task to lauch a batch file. When I run the task with option Run only when user is logged on everything works fine.
This can happen for more than one reason. In my case this happened due to a permissions issue. The user that the task was running as didn't have permission to write to the logs directory so it failed with this error.