0

I have 2 windows services that I'm developing. For Service #2, I would like it to start doing it's thing once Service #1 has completed it's task.

So I was thinking of firing an event from within Service #1, and handle the raised event in Service #2. Is it possible for 2 separate windows services to be able to communication in this fashion? If so, can someone provide a sample of this or at least point me in the right direction? If not, any other recommendations of how I can have Service #2 idle, until Service #1 is finished?

EDIT: My scenario is that Service #1 downloads various kinds data, analyzes and inserts values into a database. I would then like Service #2 to do additional processing on the newly inserted data. I don't want to just setup a timer/scheduler and continuously have Service #2 polling the database, but instead react to service #1 when it's task is complete.

I've seen the concept of memory mapped files thrown out there from some searching around I've done, but don't know if it's a simple approach for what I'm trying to do. Don't know much about WCF's as I've never had to work with them. But wouldn't it require I setup an IIS? If so, that is definitely not something I would like to invest to much time into.

Right now, (if not possible to respond to an event from another windows service) I'm thinking of utilizing SQL Server's Query Notification system, and using that to fire up my Service #2. What do you all think of this idea?

jnasty
  • 79
  • 1
  • 2
  • 9
  • possible duplicate of [How to communicate between Windows Services](http://stackoverflow.com/questions/8973462/how-to-communicate-between-windows-services) – Sriram Sakthivel Feb 20 '14 at 17:44
  • don't think either of those will work for me, as I'm not trying to pass along any data from one service to another. I basically want some type of signal for service #1 to send to service #2 telling #2 to start. – jnasty Feb 20 '14 at 21:21

1 Answers1

0

I ultimately ended up using Quartz.NET, it has worked perfectly for my needs. With Quartz.NET I set Service #1 to run at a specific schedule, then using a JobListener once Service #1's job was complete Service #2 was able to respond accordingly.

jnasty
  • 79
  • 1
  • 2
  • 9