473,662 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_Sta rt 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.T imer
AddHandler myTimer.Elapsed , AddressOf MyScheduledOper ation
myTimer.Interva l = New TimeSpan(1, 0, 0, 0, 0).TotalMillise conds
myTimer.Enabled = True
End Function

Public Sub MyScheduledOper ation(ByVal sender As Object, ByVal e As
System.Timers.E lapsedEventArgs )
Do some stuff
End Sub

Nov 18 '05 #1
0 1057

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

Similar topics

4
31211
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 http://searchvb.techtarget.com/tip/1,289483,sid8_gci535495,00.html which has the following: > Want to really get down to instants? This tip from reader Phil Lenoir tells you how. >...
1
226
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 + Enter". Now I have a little question concerning these events. When I start a second application eg Outlook. Then my timer is in the background and the CTRL+Space and CTRL+Enter events aren't catched anymore by the timer ? I have tried to set the...
3
2382
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 it gives an error saying that the file doesn't exist. Obviously the file doesnt exist yet because its only created at runtime!!
9
1395
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
1267
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 would only stay visible for a few seconds. Is this possible? If so I suppose it involves a Timer control but it is not clear to me how to program the Winform so that the textbox stays visible only for a given period of time. If is is visible for...
7
2374
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 reset I put some extra code in the subs that enable and disable the timer. They fire as expected. To test this I added a second timer with a 1 second interval. The event for this time would output the enabled status of the first timer and its...
4
4631
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 program is like so: static void Main() {
3
1117
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 client side. they close either by the user or by a timer. So on the client computer, I have form1 running. The label will pop up on top of Form 1. Sometimes Form2 will show before the label timer close the label. So the label is now stuck and...
3
3864
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 Thread)? In some of the timers I update some UI controls e.g statusbar.labels and I
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8856
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8545
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.