Solved

asp.net automate to fire every hour

Posted on 2011-09-09
5
255 Views
Last Modified: 2012-05-12
Hi,

I have built an asp.net website that sends emails if you click a button, what I want to do is automate this process so that every hour it gets called and sends emails, how can I do this

Please help

Thanks,

R8VI
0
Comment
Question by:R8VI
5 Comments
 
LVL 9

Expert Comment

by:dexterrajesh
Comment Utility
there are different options to send email automatically

1) you can use windows schedular in u r computer to send them
the following urls will help u :
http://blogs.msdn.com/dditweb/archiv...0_-Part-I.aspx
http://www.gridviewguy.com/ArticleDe...x?articleID=32

2)u can achieve the same functionality using sql server,if u are using that in u r project.
first u need to configure the sql to send emails the procedure and requirements for a computer to send email are given below,

I think you need to find an alternate for the button click event...

hope it helps

0
 

Author Comment

by:R8VI
Comment Utility
Hi dexterrajesh,

Thanks for the advise but none of the links above work, I suppose I'll have to turn the code into a desktop app and get the windows schedular to call it every hour, and code the onclick button event for onload for the desktop app.

But could you pelase provide the links so that I dont get bad request

Thanks,

Ravi
0
 
LVL 9

Accepted Solution

by:
dexterrajesh earned 500 total points
Comment Utility
can you please check it here: http://msdn.microsoft.com/en-us/magazine/cc163821.aspx
http://stackoverflow.com/questions/542804/asp-netbest-way-to-run-scheduled-tasks

you can create a console app and scheduled it using sql as they windows UI wont be used... I am not sure if this works for you...
0
 
LVL 17

Expert Comment

by:sonawanekiran
Comment Utility
Best way to write windows service. Here is simple codeproject link to start with this

http://www.codeproject.com/KB/dotnet/simplewindowsservice.aspx
0
 
LVL 16

Expert Comment

by:disrupt
Comment Utility
you can use something like so:

http://professionalaspnet.com/archive/2007/09/02/Creating-a-Background-Thread-When-the-Web-Site-First-Starts.aspx

and edit the time amount and trigger to suit your needs
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now