Has anyone been successful in getting the ASYNC option for the SYSTEM command to work? We want the program to execute on the server under Windows. Docs say this should work but it doesn't: #STAT = SYSTEM('ASYNC some_program.exe')
We are on version 5.5. Thanks.
Lew

ASYNC option for SYSTEM command
Started by
Lewis Mccabe
, Nov 18 2006 04:45 AM
3 replies to this topic
#2
Posted 18 November 2006 - 12:12 PM
You can use the "start" command:
I did this as a test:
DIR.bat contents:
dir c:\ /s > c:\temp\dir.txt
Pro-iv logic:
001 #I = SYSTEM('START C:\TEMP\DIR.BAT')
002 UMSG('RETURNED, STATUS IS ' + CONV(#I),-1)
This immediatly returns with a status code of 0, and the batch file keeps running in the background until it completes.
Just remember that this is being as a child process of the pro-iv server, so you can't run anything that requires any sort of user input.
(Actually you can, but then you need to go kill the hung process when it fails -- dont ask
)
I did this as a test:
DIR.bat contents:
dir c:\ /s > c:\temp\dir.txt
Pro-iv logic:
001 #I = SYSTEM('START C:\TEMP\DIR.BAT')
002 UMSG('RETURNED, STATUS IS ' + CONV(#I),-1)
This immediatly returns with a status code of 0, and the batch file keeps running in the background until it completes.
Just remember that this is being as a child process of the pro-iv server, so you can't run anything that requires any sort of user input.
(Actually you can, but then you need to go kill the hung process when it fails -- dont ask

Reply to this topic

0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users