Solved

asp.net automate to fire every hour

Posted on 2011-09-09
5
263 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Simple Injector with Web Service 4 39
MediaHelp 4 21
start a process from a service 3 22
C# winforms programmitically move panels 6 28
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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 Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

776 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