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

Timer using Sys Date 2

Status
Not open for further replies.

badrion

Programmer
Jul 16, 2001
34
US
I use FP2.5, is there a way to create a timer that will check for system uploads every 10 minutes (using sys date and time)?????
 
I think I understand this, I am new to Foxpro :)

Do I put the timer in the Utility program or behind the form itself (as a procedure)???

Sorry if I sound ridiculous, I'm still learning the language structure and I'm trying to maintain an existing program that's gone through 4 people. Their structure is difficult for me to find things.
 
IT can be either, it is a stand alone program / routine.
Use it just like a foxpro command word
you can put it in a form as a procedure, and expression, in a vaild statement, or
to code

PROGRAM TEST.PRG
close data
if timewait("17:00:00") = .f.
return
endif
do whatever_program_you_want David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Not having alot of luck placing it..... will work on it tomorrow, thanx for the help
 
Still having problems....

Need to check every 10 min on a file to see if the modified date has changed, if it has not changed then I need to throw up a flag on a form stating there has been no activity for 10 minutes.
 
I do not understand, why not try simply
wait timeout 600
in appropriate cycle ?
 
[tt]
Store 600 to ccTimer
Store "" to lcThisTime, lcLastTime
do while .t.
lcLastTime = lcThisTime
lnFiles=adir(laAray , FileName2Check)
lcThisTime = laAray(4)
if lcThisTime != lcLastTime
throwup flags
endif
for x = ccTimer to 1 step -1
lcMsg = time() + chr(13) + ;
"Next Loop " + alltrim(str(x)) + chr(13) + ;
"Ctrl-End To Stop" + chr(13) + ;
"ESC For Next Loop"
wait lcMsg window nowait
lnLastKey = inkey(1)
do case
case lnLastKey = 27
exit
case lnLastKey = 23
exit
case lnLastKey = 159
exit
endcase
endfor
do case
case lnLastKey = 23
set step on
case lnLastKey = 159
exit
endcase
enddo
[/tt]
David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top