Reputation: 969
I want to write a WCF service that polls data from another service (could be ASP.NET Web Service) and puts that data into a DB. I want my WCF to service to poll in 5 minute intervals. What is the best way of doing this? If I host it in IIS, how do you trigger it to poll?
Thanks
Upvotes: 0
Views: 221
Reputation: 65471
A WCF service does something when it is called. A WCF service should not be use as something that initialise the poll.
A windows service can be used to poll another service and do other tasks.
In the windows service have a code block that is an infinate loop. In the loop do the task that you want to complete, and a thread sleep of 5 mins. The service will then do what ever task you need every 5 mins.
Upvotes: 1