Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Windows Services Alternative [closed]

Tags:

c#

Could anyone please tell me whether there is any alternative to Windows Services? The reason for my question is that I find windows services hard to test as it requires it be installed first.

Thank you.

like image 494
Nil Pun Avatar asked Jan 22 '12 03:01

Nil Pun


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

Is C language easy?

Compared to other languages—like Java, PHP, or C#—C is a relatively simple language to learn for anyone just starting to learn computer programming because of its limited number of keywords.

What is C in C language?

What is C? C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language, despite being old. C is strongly associated with UNIX, as it was developed to write the UNIX operating system.

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.


2 Answers

Check out the Topshelf project. Simplicity of a console application, but can installed as a windows service.

like image 75
Darren Kopp Avatar answered Oct 12 '22 23:10

Darren Kopp


This just requires properly organizing and factoring your code so it doesn't need to be called from the service method. I.E., you have a function call that runs everything - which can either be called from the service, or by your Main method - or by NUnit, etc.

Otherwise, if you still want an alternative, you could write everything within the Main method, and then run your program as part of a Windows Scheduled Task.

like image 23
ziesemer Avatar answered Oct 13 '22 00:10

ziesemer