We are using WebBrowser control to download a certain file in console application. We scheduled this console application in task scheduler with this selected option "Run only user is logged on", its working fine. But we scheduled this for "Run whether user is logged in or not". It will not work.
We couldn't see any error in command prompt. Can any faced this scenario?
C# – Task scheduler doesn’t work when select “Run whether user is logged in or not”
cscheduled-taskswebbrowser-control
Best Answer
If an application is set to run whether the user is logged in or not, no user interface will be displayed. See here:
https://social.technet.microsoft.com/Forums/windows/en-US/c03d6691-b058-4f8d-961c-e8eba25bbaed/task-scheduler-problem-run-whether-user-is-logged-on-or-not?forum=w7itprogeneral
An easy proof of this would be to write to a logfile when the application is launched. If the file is created at the expected time, then the task scheduler is working correctly and the application is being run.
Regarding your comment below
If you have the machine turned off at the scheduled time of the task, it will not run. It can be logged out, but the machine does in fact need to be turned on. Your comment makes this seem like the cause.