Solved

asp.net automate to fire every hour

Posted on 2011-09-09
5
266 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
ID: 36509574
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
ID: 36509586
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
ID: 36509808
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
ID: 36510299
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
ID: 36514947
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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

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 article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 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