>Hello Tamar
>
>Many thanks for your reply, but the purpose to use a Timer um VFP is running a SQL query in a TEXT..To and create a cursor inside a browlist
>If the cursor has data showing the same, if not data does nothing.
>in these 2 cases after run i want restart the timer and only after 30 minutes re-run the instructions.
>I can not use the QUIT command because it closes the whole program.
>I've been looking for some example of how to use the scheduler Windoes tasks in VFP, but found no example for what I want.
>If you can show me a link to an example, thank you very much to show me the link.
I haven't used Scheduler, but Doug's stuff is generally quite solid:
http://doughennig.blogspot.com/2007/04/scheduling-tasks.html>I hope you can give me another suggestion.
You can go ahead and try the VFP timer. I think if I were doing something that called for a 30 minute timer, rather than setting Interval to 30*60*1000, I might subclass Timer and add a StartTime property, then set that each time I do the task. Then I'd use the Timer set for 1 minute or something like that, and when it fires, check the current time against StartTime to see whether it's long enough.
That said, I've never tried to use a timer for anything longer than a minute or so, but it might be just fine. Have you tried just setting Interval and putting your code in the Timer method?
Tamar