tags:

views:

24

answers:

1

Hi,

We have a WCF service, hosted on IIS7.5, that has to fetch some data from an external web service.

Is there some way to schedule this action to be started, in our WCF service, on a regular (timed) basis?

Thanks

+1  A: 

Yes, create a Windows service which wakes up every x minutes or hours and makes the call.

The WCF service is not "always on" - it is typically only created when a request comes in and needs to be handled. But you would typically host your WCF service in either IIS, or self-host - which usually already means a Windows Service anyway.

marc_s
Ahh, thanks. Problem is that the necessary code is already in a WCF service which also gets called from a Wep App. So I'd like to reuse the same webservice. I guess we could kick the webservice from a new windows service acting as a scheduler?
stupid-phil
@stupid-phil: if you're in the Windows Service, you can reference the WCF assembly, and instantiate the WCF service class and run the method in question, yes.
marc_s