how to have a function run inside a service every 10 minutes?
I have a windows service running, inside this i want to run a function every then minutes. I have found some code but it doesn't seem to work? I have a logger and it does not seem to go into the timer_Elapsed function ever? protected override void OnStart(string[] args) { // SmartImportService.WebService.WebServiceSoapClient test = new WebService.WebServiceSoapClient(); // test.Import(); log.Info("Info - Service Started"); _timer = new Timer(10 * 60 * 1000); // every 10 minutes?? _timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed); } private void timer_Elapsed(object sender,