473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Question concerning Timer Control

I need to syc data from a local database with an external database on another
website once a day. I decided to try a timer contol and create an instance in
my global.asax. I call the function below in my Application_Start event.

For testing I set the timer interval to once every 3 minutes. My problem is
that the timer will work fine for about 20 to 25 minutes and then stop. When
I hit the website again the timer will start again and then stop.

Any suggestions would be most helpful.

Public Function StartSchedule() As String
Dim myTimer As New System.Timers.Timer
AddHandler myTimer.Elapsed, AddressOf MyScheduledOperation
myTimer.Interval = New TimeSpan(1, 0, 0, 0, 0).TotalMilliseconds
myTimer.Enabled = True
End Function

Public Sub MyScheduledOperation(ByVal sender As Object, ByVal e As
System.Timers.ElapsedEventArgs)
Do some stuff
End Sub

Nov 18 '05 #1
0 1050

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: William Bub | last post by:
Is there an accurate way to create a "stopwatch" good to 1/10 of a second? I'm not sure if I should use the timer control, or some way to access the computer timer. I found the following site...
1
by: Mvk | last post by:
Hi; I have a little "timer"-application. The timer starts running when I press the "CTRL + Space" buttons. The timer ends when I click again on "CTRL + Space". Resetting the timer: "CTRL +...
3
by: Z D | last post by:
Hello, I've created a winform user control that, at some point in the default constructor, looks for a specifc file. When I try to load the user control to my winform's form during design time...
9
by: Zach | last post by:
I would like to express the time with the time continually changing. I can get it to show once, but then it stays that way, using a loop jams. Is there a way to do this?
4
by: Woody Splawn | last post by:
I have a Yellow text box on a winform that normally stays hidden but on occasion I make it visible to display some message to the user. In one particular case it would be nice if the text box...
7
by: Noozer | last post by:
I have a timer on a form. It isn't firing at all. I know that the timer is enabled, and that the interval is low (4000, which should be 4 seconds). To ensure the timer wasn't being inadvertantly...
4
by: grayaii | last post by:
Hi, I have a simple form that handles all its paint functionality like so: this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true); And the entry point to this...
3
by: =?Utf-8?B?UnVkeQ==?= | last post by:
Hello all! I'm having a problem with a stuck label. I have two applications, one that runs on a server, the other a client. The server application controls all of the forms that open on the...
3
by: Steve | last post by:
Hi All I am using VB.net 2008 and use timer controls within my applications Question Does the code in a Timer control.tick event run on a different thread to the main Application thread (UI...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.