Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When do we use windows service?

Are there situations that we should use a windows service ?
I am building a client-server project (c#) and the server supposed to work alone without any user so someone advised me to use a windows service to run the server, is this right ? or there are a better solutions ?

like image 449
Mohamad Alhamoud Avatar asked May 21 '10 17:05

Mohamad Alhamoud


1 Answers

Windows services are normally used when an application needs to continuously run. For example if they need to:

  1. Wait for incoming requests. (Like through remoting or wcf)
  2. Monitor a queue, file system etc.

If a program just needs to run periodically, like once a day. It is normally easier to create a scheduled task.

like image 118
kemiller2002 Avatar answered Oct 15 '22 15:10

kemiller2002