Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Schedule/Alert Daemon

Posted on 2010-08-17
3
324 Views
Last Modified: 2012-05-10
Dear Experts,

I need a C# process to run on Archive and monitor the database for certain conditions, and send email alerts when a particular event occurs. Maybe somebody could tell me how I could make a service that would do something every e.g. 20 minutes (or some other programmed time period)?

Thanks.
0
Comment
Question by:tantormedia
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
devarajamurthy earned 500 total points
ID: 33456969
Use CLR trigger to send email alerts on any of the database trigger event. Alternatively can use Timer set to 20 minutes that calls a function to check with database. I prefer CLR trigger if email alerts are required soon after database change.
0
 

Author Comment

by:tantormedia
ID: 33457096
devarajamurthy,

Thank you for your answer. Could you tell me what Timer is? Do you have any example how it is used?

Thank you very much.
0
 
LVL 1

Expert Comment

by:devarajamurthy
ID: 33462244
For Timer object instantiation you can use System.threading.timer class. set the interval of this object to your required time and set the routine name to be called at every interval. The routine specified will be called at specified time intervals where you can have code to send email.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled

840 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