Solved

ASP.net scheduling

Posted on 2013-11-14
2
212 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
2 Comments
 
LVL 35

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
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…

757 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

18 Experts available now in Live!

Get 1:1 Help Now