[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

ASP.net scheduling

Posted on 2013-11-14
2
Medium Priority
?
226 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:Murray Brown
[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 2000 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:Murray Brown
ID: 39654141
Thanks
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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