Solved

ASP.net scheduling

Posted on 2013-11-14
2
221 Views
Last Modified: 2013-11-16
Hi. I am trying to schedule emails in my ASP.net website and got the following code
at http://www.codeproject.com/Articles/49996/Schedule-Email-Through-ASP-NET-or-Schedule-Tasks-U
I can see where the first procedure is but am not sure where to put the second and which
control (if any) to add to the application

' Inside Global.ascx
Private Sub Application_Start(sender As Object, e As EventArgs)
      ' Code that runs on application startup
      Dim myTimer As New System.Timers.Timer()
      ' Set the Interval to 5 seconds (5000 milliseconds).
      myTimer.Interval = 5000
      myTimer.AutoReset = True
      AddHandler myTimer.Elapsed, New ElapsedEventHandler(AddressOf myTimer_Elapsed)
      myTimer.Enabled = True
End Sub

Public Sub myTimer_Elapsed(source As Object, e As System.Timers.ElapsedEventArgs)
      ' use your mailer code
      Dim objScheduleMail As New clsScheduleMail()
      objScheduleMail.SendScheduleMail()
End Sub
0
Comment
Question by:murbro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 39647605
Both procedures are located inside Global.ascx.
You just need to implement your mailer class. (clsScheduleMail) in App_Code

<link removed - GaryC123>
0
 

Author Closing Comment

by:murbro
ID: 39654141
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

728 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