I've been searching for a few hours for a possible solution and advice about my scenario.
I have an XML file which is created when we request it from the server. There are several services which then look at the XML file and consume it's data.
I've written a WCF which will update the XML file. What I'd like to do is to set up a Windows Service to call the WCF every 10 seconds. This will force the XML file to be updated every 10 seconds.
I am struggling to find how to create the windows service and install it. Also is this the best approach? I have used scheduled tasks on the server before - but this only offers 1 minute intervals. I could write the script to sleep and re-call istself every 10 seconds I suppose?
Thanks for any info.
There are plenty of tutorials on how to create and install Windows Services. This is the one I used a few years ago to learn: http://www.codeproject.com/Articles/106742/Creating-a-simple-Windows-Service
Best is to give it a go, and come back here with specific questions when you get caught on something.
protected override void OnStart(string[] args)
{
// this is where you'd put the logic that does the work (as per the example)
// create a Timer object to execute your desired functionality
// every 10 seconds.
}