Solved

C# windows service listener

Posted on 2013-01-04
1
467 Views
Last Modified: 2013-01-20
Greetings,
I am building a windows service that gets information when a scheduled task is complete.

I see alot of info on how to GET the status, but unless I am constantly querying the task monitor I won't get what I need.

I was wondering if there is a way to have my service listen for a task to be executed, then do some querying...

For example, i ahve a scheduled task AT123
I don't want to ask every 5 seconds if it was executed,
i want to listen to it to do something when it's executed...

thanks
0
Comment
Question by:Evan Cutler
1 Comment
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 500 total points
ID: 38745170
I immediately thought of the "observer pattern" to solve this. A quick search brought up this posting:

http://stackoverflow.com/questions/693050/implementing-observer-pattern-using-wcf

I think something like what this guy did would be what you might be looking for. Basically, set this up so that when the task completes, it calls the event across WCF.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now