Search code examples
console-applicationscheduled-taskswindows-server

Windows console app doesn't work by calling it via task scheduler but successfully through the console


The task is running until the specified limit time (30 mins). No results, but I got results if the task is run through the console.

I have four tasks scheduled to run at the same time. The tasks call the same console app. Only one ran successfully. The other three have stop until the specified limit time.

Via the console, each task spends less than 5 secs. to run.

Thank you in advance.


Solution

  • The console app calls reports from Reporting Services and they need credentials to run (SQL Security). The task was set up in Security Options to run it using the System user account. So this caused 500 server errors. Putting allowed user credentials that can run the report was the solution.

    And of course, executing the app through the console worked because it takes my credentials to run the report.