Monitoring the heart rate of the application, possibly via the SQL server


I have an application written in ASP.NET C# that should run for about 2 days and then stop until it is started again. The application sometimes runs into some trouble that, at the moment, requires manual intervention to make it continue. (So far, SQL server in itself was never the problem)

When working, the application writes a line to a log database table at least every 20 minutes. If these lines are not there, it means the application either finished the task or needs help to continue. In these cases, I would like to get an email or some other notification.

What is the best way to detect and notify me if or when the application has stopped writing these lines to the log database table?

If it makes things easier, I could make the application perform some other regular task, such as writing to a file or sending a TCP/UDP packet somewhere.

Aside of the obvious concerns with the design of this application. Given your current design, you could potentially write a windows service to monitor the log file. If it's older than N minutes, fire off an System.Net.Mail.MailMessage.