Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a timer
Message
De
24/06/2016 08:52:25
 
 
À
24/06/2016 05:16:15
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01637566
Message ID:
01637646
Vues:
81
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform