Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Background process
Message
 
To
21/11/2001 15:44:56
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00584685
Message ID:
00584943
Views:
34
This message has been marked as a message which has helped to the initial question of the thread.
I've done a lot of this in various database packages - the simplest method is to have your exe check for a start-up parameter and if it finds one, act as a slave rather than the usual app. You can pass jobs back and forward in a table and/or as the passed parameter (if you use the table method, you can keep operating until you have cleared all jobs and then finish or keep the program running in the background all the time).

Your code will look like:

if !amslave
--submit job
--return
endif

...otherwise, we are the slave, so do the job...

This has two advantages: you only have one set of source code to maintain and you can test in your main program and change to a 'slaved' operation later (either after testing or when you discover that the operation's duration has increased - you can even determine this at run-time). Also, if you have set up security, etc., in your current app, your code is all there and available to you (you are not providing back-doors to your data through some kind of utility program).


>I was thinking about doing some lengthy processes in the background. For this purpose, I might need to start a separate EXE (perhaps a second instance of the original EXE - or perhaps I will have to separate the lengthy processes into other files). The idea is that the user specifies some lengthy process in the main program (e.g., prepare a lengthy report), and the second EXE is started automatically.
>
>Does anyone have experience with this? Or can point me to better alternatives to do this?
>
>TIA, Hilmar.
Previous
Reply
Map
View

Click here to load this message in the networking platform