I am developing a windows service that takes some invoices from and database and process them.. The service is scheduled to run every 10 minutes.
But the problem is that it starts a new thread after every 10 minutes even though previous process has not completed yet.
Is it possible to schedule windows service in a way that it runs after every few minutes but only if it is NOT running already (like in windows task scheduler)?
I have scheduled my windows service as shown in following link: https://www.aspsnippets.com/Articles/Repeat-Task-every-N-interval-using-Windows-Service-in-C-and-VBNet.aspx