Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simulating Scheduled Tasks in VFP
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00181129
Message ID:
00181136
Views:
12
>How can I best set up a process that needs to run every hour?
>
>For instance, I need to run a program that goes out and checks
>for the existance of new files on a directory. If new files
>are found then a program will need to be run to import this
>data.
>
>Thus far, I have thought of something like the following:
>
> DO WHILE .T.
> lnx = ADIR(lax,'\searchdir\*.*')
> IF lnx > 0
> DO importprogram
> ENDIF
> ENDDO
>
>I suspect that the CPU useage will always be at 100% and
>a PC will need to be dedicated to only this task.
>
>Is there a better way to do this that can check every
>hour or so. Perhaps a class with a timer event.
>
>I suspect that someone has had to create something like
>this before... right?

Actually, yes, I did exactly what you're saying, but unfortunately for you, I did it exactly the way you said. There was a machine dedicated to running only that process. It ran in a continual loop checking a directory for uploaded files, and processing any it found. Did this in VFP 3.0 about 3 years ago.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Reply
Map
View

Click here to load this message in the networking platform