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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timer Control not kicking in...

Status
Not open for further replies.

BABSBINI

IS-IT--Management
Sep 19, 2005
11
US
Hi All,
We have a small VFP 8.0 synchronization utility that picks data from a VFP 8.0 database, converts it into XML and sends it over the net to an Oracle database. It has a timer control on it which makes sure that this utility sends the data from VFP 8.0 to Oracle every 45 mins.
It has always worked on all the setups till now, except one. We have not been able to figure why it does not work on that one. Any hints or directions to think in?
The new setup that it does not work on is Win Xp Pro. Is there anything in the OS that can turn off the timer or stop triggering it?
Regds,
BABS
 

Babs,

In what way doesn't it work? Is the timer failing to fire, or does it produce an error, or what?

Also, is this the only machine which is running XP Pro? In other words, can you say for sure that it always runs on something other than XP Pro, and never runs on XP Pro?

Has anything else changes since it last worked?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Hi Mike,
Yes, it doesnt fire; doesnt give any error though.

Yes, as of now this is the only XP Pro system we have and has the problem. We hadnt explicitly tested it on XP Pro as we never thought that this could be a hurdle! But I cannot say for sure that the problem is XP Pro.

No, nothing has changed in the exes that run on the other 15 setups and this one.
BABS
 
We've got timers running under XP Pro. Nothing as long as 45 minutes though. Does the timer work if you reduce the interval to 5 seconds?

What else is happening on this XP machine? Is the user doing something to hog the processor or is it sitting there unused and going into some sort of hibernation?

Geoff Franklin
 

I've never heard of any timer problems specific to XP Pro -- or any other version of Windows. I suspect it's something else in the environment of that machine that's causing the problem.

Sorry I can't suggest anything.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Geoff,
Actually, the least I can reduce it to is about 10 mins as the sync process takes about 6-7 mins to complete.
On our development setup it triggers after whatever time I set it to except on that one setup!

Mike,
Thanks! I believe its got something to do with the environment of the machine too. Just needed an experts opinion confirming the same.
BABS
 

Babs,

Perhaps you need to remove anything at all unusual on the machine in question -- virus checkers, network software, whatever -- until it starts working.

Let us know if you get an answer.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
You maay not be able to reduce that specific form's timer to less than 20 minutes due to processing timing, but, for the sake of testing, perhaps you can build a separate Test Form that includes a timer.

Set that Test Form's timer to something like a minute so that you don't have to wait so long to observe its operation (or not). You can have its timer do something as simple as merely display a WAIT WINDOW when the timer is fired.

Then, if it works as anticipated, gradually extend out the time and continue observing it.

From that set of tests you should be able to determine if the Timer itself is the problem or not. If the Timer works for that situation, then there is something else that is introducing the problems.

By eliminating the variables you should be able to track down the cause of the problem.

Good Luck,
JRB-Bldr
 
I wouldn't trust any timer to fire once every 45 minutes... I can't really explain why; it just doesn't "feel good". I think mainly because the number of milliseconds is SOOOO BIG ( 45 minutes = 2700000, I don't trust the computer to add that many milliseconds together, and I expect that if the computer is busy during that brief moment, the "timer" event might be lost.)

I'd suggest using a timer that fires every 10 seconds and, when it fires, check the current time against the last time the process was run (or the start time of the program). If it has been longer than 45 minutes, set the timer.enabled = .f., and fire off your sync program. (don't forget to set timer.enabled = .t. after the sync completes).

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Babs,

Perhaps my distrust of timer's with large intervals is from a previous limit in VFP6 that restricted Interval to an 16bit integer value, up to 36,635 ms, as indicated in this thread: thread1254-1126788

It seems like this limit might be removed in VFP7,8,9, but there may be an undocumented limit now, and you may be exceeding it. I still recommend the shorter interval because of the potential for "dropped" events.

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top