I have a console program (C#) that I’ve built and want to run on Amazon EC2 (Windows). The good part is that the program runs absolutely fine. The problem is that I have to be logged in via Remote Desktop for the console program to continue processing. I have tried leaving the user logged in (just close via the X close) but that was to no avail.
The program is an infinite loop that should just keep processing forever. How can I get the program to run even while not RD’ed in?
Little extra info: I’ve installed the program in the default (one-click install) way.
Thanks!
You can use Windows Task Scheduler to run a console program when you are not logged in.
http://msdn.microsoft.com/en-us/library/aa383614.aspx
http://en.wikipedia.org/wiki/Windows_Task_Scheduler
Note that Windows Task Scheduler would have to initiate the program. That does not allow you to interactively start a console program as an interactive user (i.e. from your RDP session) and then keep it running.
Alternatively, it is fairly straightforward to transform a console program into a windows service.