Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simulating Scheduled Tasks in VFP
Message
De
28/01/1999 03:34:10
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
27/01/1999 23:09:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00181129
Message ID:
00181215
Vues:
14
>Tom:
>
>I did something like this for a client recently - created a form with a timer, set the timer to fire every so often. Worked really well, but don't have the code to send to you. The basic idea was:
>
>1) Use a log file (dbf) to record the files that have been processed, capture the name, date/time, file size, etc. The import process would then compare the contents of the directory to the log and process any new files
>
>2) One problem I faced early on was if the import process was already running when the timer fired - to fix, I added a "busy" flag to the form, and the timer checks this flag before calling the import routine. The import routine sets the busy flag when it starts and clears it when done.
>

Just to add an alternative way: we've done something like that in a different manner (using a Telix for Dos script on a 286 with no disk drive, booted from a floppy, and it just scanned one directory all the time) - we moved any processed file to a temp directory, and ran a cleanup weekly or so. The cleanup was added to the task list of the Admin :).

In the Fox part of the thing, we fired the scanning routine from the menu, whenever the user opened or closed a popup. Didn't turn this on for all users, only for a specific class of users who needed the results of scanning, and there were only one or two at a time.

Anyway, Fox moved any received files into a temp folder when they were processed, and put the response files into an outbox like folder. Telix sent them as soon as it could, and then moved them into another temp folder. This way we could go without much of tracking the temp tables; the filenames had to be very strictly generated, though - they contained the phone directory entry for each user in the first 4 chars, and the rest was a generated ordinal number.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform