Payal Nair

Payal Nair

  • NA
  • 79
  • 0

Console app not launching via task scheduler

Feb 3 2018 1:48 PM
Hi,
 
I have implemented a simple console application in C#.Net that writes something to a text file in "C:\MyFolder" as soon as it launches. I have configured the application in task scheduler with the below properties.
 
General tab->Run whether user is logged on or not.
Triggers -> At system start up
Actions -> Program/Script = Path to my exe ( E:\MyProject\Test.exe)
Start-in = Path with exe name . (E:\MyProject)
I am expecting the text file to be present once I start my machine. That is before logging in to the desktop as I have set the property to "At system start up" rather than "At log on" . However only If I log in to the machine, my exe starts running and the file gets copied. Is it because it is a Console App which requires a Desktop/UI to launch.?
 
So how will be the case in server machines where we don't have a user login or it gets logged in by default.? How can I make my console application to lauch/ or work in background even before login/ where there is no login?
 
Please clarify!!
 
Thanks

Answers (6)