473,503 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Timed Interval Coding

I need to perform some updates such as retrieving a web page every 1 hour
or so. Is the timer control approriate for this kind of thing? Are there
other ways to do something like this?

Thanks
Slonocode
Nov 20 '05 #1
4 846
A timer control can do it, but if your process takes a while, you probably
won't like the results. Sounds like a great job for a background thread or
the System.Threading.Timer (as opposed to the timer control)
"Slonocode" <st*******************@yahoo.com> wrote in message
news:bt************@ID-137764.news.uni-berlin.de...
I need to perform some updates such as retrieving a web page every 1 hour or so. Is the timer control approriate for this kind of thing? Are there
other ways to do something like this?

Thanks
Slonocode

Nov 20 '05 #2
* "Slonocode" <st*******************@yahoo.com> scripsit:
I need to perform some updates such as retrieving a web page every 1 hour
or so. Is the timer control approriate for this kind of thing? Are there
other ways to do something like this?


Did you read the documentation for:
'System.Windows.Forms.Timer'
'System.Threading.Timer'
'System.Timers.Timer'
?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Slonocode,
In addition to the others comments, do you want your programming always
running? Does your program do other things when it is not updating?

I would consider using a Scheduled Task under Windows Control Panel to
schedule the job to run every hour. Especially if the update only takes 1 or
2 minutes...

Alternatively I would look at using System.Threading.Timer or
System.Timers.Timer in a Windows Service Project, and let the update app run
continuously, performing the update on each timer event...

Hope this helps
Jay
"Slonocode" <st*******************@yahoo.com> wrote in message
news:bt************@ID-137764.news.uni-berlin.de...
I need to perform some updates such as retrieving a web page every 1 hour or so. Is the timer control approriate for this kind of thing? Are there
other ways to do something like this?

Thanks
Slonocode

Nov 20 '05 #4
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:eE**************@TK2MSFTNGP09.phx.gbl...
Slonocode,
In addition to the others comments, do you want your programming always
running? Does your program do other things when it is not updating?

I would consider using a Scheduled Task under Windows Control Panel to
schedule the job to run every hour. Especially if the update only takes 1 or 2 minutes...

Alternatively I would look at using System.Threading.Timer or
System.Timers.Timer in a Windows Service Project, and let the update app run continuously, performing the update on each timer event...

Hope this helps
Jay


I knew I should have included more info in my original post.:-)

It's basically a desktop application that may or may not run all all the
time. That would be up to the user.

It displays data obtained from a url. The data from the url is in xml
format. If the application is running all the time then it needs to update
itself at a specific interval.

I will investigate the timer classes suggested above.

Thanks
Slonocode

Nov 20 '05 #5

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

Similar topics

2
1620
by: Javaman59 | last post by:
I have a GUI which is monitoring a real-time device. I have several timed actions, such as periodic polling of the device, and indicators which flash for a fixed period. My first implementation...
1
4454
by: benmorganpowell | last post by:
I have a small windows service which connects to a POP3 server at defined intervals, scans the available messages, extracts the required information and inserts the data into a SQL database. I am...
2
3240
by: Lloyd Sheen | last post by:
I have a problem which I would think would be a common one. If the user attempts to enter an ASP app in a screen which is not the logon (could get it from history), I want to be able to do the...
5
8998
by: Sachin Surana | last post by:
We use HttpWebRequest to send the request at a URL. But some times the method GetResponse throws a time out exception. But when we check the IIS logs, there is no such entry. So the request never...
6
3764
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
1
1976
by: Ed Smith | last post by:
The Postgres INTERVAL literal is not compliant with the ANSI 2003 SQL Spec. Here's the Postgres way: # select INTERVAL '45 DAY'; interval ---------- 45 days (1 row) The spec. says
3
6501
by: alex.fishman | last post by:
Hi, I need to implement a container for integer intervals, something that looks like (1,5), (10,20), (4,7), etc. The container has to be of the following properties: search for an arbitratry...
9
2636
by: archana | last post by:
Hi all, I want to know about interval of timer. I am using timer in windows service.I head somewhere that when i set interval property of timer while setting interval, restart time of Pc is...
1
1060
by: Dracitus | last post by:
i have been trying to set a amount of time a random number has like TextBox6.Text = CStr(Int(Rnd() * 10)) ' This variable will be the loop counter.
0
7205
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
7093
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
7353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7011
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...
0
7468
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...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3180
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...
1
747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.