views:

179

answers:

7

Hi,

I have a book lending system written with ASP.NET, VB.NET and LINQ to SQL. I want the web app to send the e-mail reminder about the due date to the borrower before the book is over-due. Should I write a desktop app to check the due date or there's another way around to send e-mail reminder?

Thank you for any suggestion.

+3  A: 

Write a service or a console app that is run with Windows scheduled tasks, then have that consult the database for due dates, and send out emails accordingly.

Don't use desktop interaction.

whatsisname
+1  A: 

I think a windows service is suitable for this task. Take a look at that question about using timer with a windows service.

Canavar
+1  A: 

If you write a windows desktop app then it will not run if you don't login in. You can write a windows service and install it in the server and it can send out reminder emails.

Shoban
A: 

I would check out Quartz.NET an open source job scheduler for the .NET platform. You can use it to perform scheduled tasks inside of a Windows service. For example, you could schedule a task to run every morning and have it query your database and then send out an email if the due date of a book is within the range.

David Glass
A: 

A great little starter tutorial i have bookmarked for windows services here

Jammin
A: 

Depending on how much traffic the site sees, you could make use of HTTP Cache like how StackOverflow does. You can read about it in this blog post. Although the blog appears to be down right now, so here's the Google cache.

Agent_9191
+2  A: 

Scheduled service. If your LINQ backend is a decent database (like SQL Server), you can schedule a task with the SQL Server Agent and have it fire off emails when necessary. That could be accomplished via script, or a CLR SQL assembly (effectively, a .net assembly that plugs into the SQL server).

David Lively