General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only