Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best practice for interval event

Status
Not open for further replies.

sdh

Programmer
Joined
Apr 30, 2001
Messages
121
Location
GB
I have a vb app that I want to fire an event when the system date matches that stored in the application

the interval will be at least a week possible longer. I obviously cannot directly use the timer control and want to reduce payload on the machine

any suggestions and or code would be really helpful
thxs
shaun
::-)
 
What else than the timer would you want to use to periodically generate events?

If it's a week or longer, just set a timer that fires every now and then and at that moment compare the system date/time with the date/time of your interest. It doesn't produce much overhead.
Greetings,
Rick
 
thnxs Rick

But I have an exact time within my app and I want it to fire with a minute or so from that time so I would be firing the timer every minute to comare dates !
seems a bit wasteful
::-)
 
consider using the system scheduler?

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
thank you micheal I started to look at that

the taskschedular api looks complicated !

do you have any examples i could learn from

::-)
 
if it is a 'repeating' item, I would not do it programatically!. Just open it and enter the info. I have not used any programatic interface for this app.


MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
>>so I would be firing the timer every minute to comare dates ! seems a bit wasteful

Do you really think that, besides all the other stuff you app needs to do and all the other stuff that all other processes need to do, comparing two dates every minute or so would be a waste of resources ?

I'd almost say that that particular piece of code might just be the least resource consuming piece of code executing on your pc at any time....
Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top