In general, I prefer windows scheduled tasks as long as the running frequency is less frequent than once every 30 seconds. I.e. more than 30 seconds between two consequent tasks.
windows scheduled tasks
* Easy to debug
* Easy to setup
* Can be run in silent mode, i.e. no console window flashes every time when the program is run.
windows service
* Run in background by default
* Can start and stop the service in the windows services.exe
* Can be run very frequently
Showing posts with label Keep Alive Application. Show all posts
Showing posts with label Keep Alive Application. Show all posts
Tuesday, 11 October 2011
Hide Console Window in C# Console Application; Run console application in a silent mode, KeepAlive Application or Service
The problem:
I created an window console application and run it as a windows scheduled task. But the console window flashes and goes back every time the app is run.
The solution
Option 1: (Best Option)
Change the output type from Console Application to Windows Application. This can be done under Project -> Properties -> Application in Visual Studio:
Option 2: Make a window service app using windows servicebase class
I created an window console application and run it as a windows scheduled task. But the console window flashes and goes back every time the app is run.
The solution
Option 1: (Best Option)
Change the output type from Console Application to Windows Application. This can be done under Project -> Properties -> Application in Visual Studio:
Option 2: Make a window service app using windows servicebase class
Subscribe to:
Posts (Atom)
