Solved

C# windows service listener

Posted on 2013-01-04
1
465 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 19

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

746 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

12 Experts available now in Live!

Get 1:1 Help Now