Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wrapping a util to run only once per day
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01112010
Message ID:
01112338
Views:
15
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform