Solved

C# windows service listener

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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...
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

792 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