what I want to do is write a program that listens wcf web service frequently , say once every half-hour, and updates db according to ws result.What is the proper way of writing that kind of program.Should I create an exe and make it a windows scheduled task or write a program that has an infinite loop , maybe a thread approach.What is your opinion ? Thank you for any help.
-
1windows scheduled task would be better as incase your exe got terminated,it will resume it. – Anand Oct 31 '13 at 07:49
-
You need to create a windows service. – Alex Filipovici Oct 31 '13 at 07:52
1 Answers
You probably have to create a Windows Service Application:
Microsoft Windows services, formerly known as NT services, enable you to create long-running executable applications that run in their own Windows sessions. These services can be automatically started when the computer boots, can be paused and restarted, and do not show any user interface. These features make services ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer.
In order to implement a recurring event, you need to use the Timer Class.
On a second thought, supported by these references:
- windows service vs scheduled tasks
- Windows Service or Scheduled Task, which one do we prefer?
- //TODONT: Use a Windows Service just to run a scheduled process
a scheduled task seems also a nice solution which fits your scenario.
In terms of available .NET libraries, there is no difference between the 2 alternatives.

- 1
- 1

- 31,789
- 6
- 54
- 78
-
Thank you reply , but is there any restrictions of .net libraries if I use Windows Service Application.Can I get the advantage of .net libraries.I will use c# by the way. – Davut Özcan Oct 31 '13 at 09:23
-