Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wrapping a util to run only once per day
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01112010
Message ID:
01112338
Vues:
17
This message has been marked as the solution to the initial question of the thread.
>Hi all
>
>I have a utility that I want to run only once per day, irrespective of the number of times my computer reboots. Is there any way to wrap this utility via VFP and put in the startup so that VFP warpper runs it only once the way I want it.
>
>Or is there a simple registry trick to do the same.
>
>It is a third party util and is currently run from the Startup menu.
>
>Please advise.

You could store the last run date in the registry, dbf, or ini file Your vfp app would always start up, but would quickly shut down if it has already been run.


#retreive last run date from registry or ini file
ldLastRunDate = GetLastRunDate(lcMyAppName)
if ldLastRunDate< date()
= StoreLastRunDate(lcMyAppName, date())
run &lcMyAppName
else
return
endif
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform