Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

Technologies : ASP.Net WebForms or MVC, WebAPI

I need to create "something" to send notifications, kind of reminders, for instance to remind a person his appointment with a doctor.
The dates to send the notifications are saved in a DB

The "something" has to scan the database looking for the notificacionts to be sent, let's every 10 minutes.

I use the word "something" cause I don't have any idea about how to do it by now.

Maybe to create a thread in the global.asax during the Application_start event.
Maybe there's a third party component, I don't know

Thanks in advance!!
pascualito

What I have tried:

nothing yet, starting to explore solutions
Posted
Updated 14-Feb-20 3:28am

If it has to be in ASP.NET, there are various tools you can use to schedule background jobs:
How to run Background Tasks in ASP.NET - Scott Hanselman[^]

However, I would be inclined to create a small console application to scan the database and send the pending notifications, and then use the Windows Task Scheduler to schedule it to run every ten minutes.
 
Share this answer
 
Hi

I haven't read the first option yet, but I agree with you about the second solution. It's seems to be a very simple solution.

Thanks a lot Richard!!

Pascualito
 
Share this answer
 
If you are using SQL Server, another option would be to utilize SQL Agent as well as Database Mail

How To Send Mail Using SQL Server: Part 1[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900