The solution I am working on requires multiple processes that are built in multiple Windows services all built using C# running on .NET.
Each service runs every hour. Everything works fine.
One of the requests now is to do all services as fast as possible. Therefore I want these services to run consecutively.
How to call one service from the other or have a pipeline that runs all services one after the other.
You could use FileSystemWatcher
and use folders as simple queues between services. Also note, FileSystemWatcher
might not be 100% Reliable: FileSystemWatcher vs polling to watch for file changes
Might need to set the NotifyFilter
to get the behaviour you want.
You could also add a mutex to the service, that detects if it is already running perhaps, and consumes folder/file changes in one go.
There are other heavier weight, fully featured message queues, but these might be overkill for your needs.