Solved

Schedule/Alert Daemon

Posted on 2010-08-17
3
322 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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