Calling an external process in the export script

Using an export script to call an external process that does not call back the script itself will cause the task to freeze at the publication stage. This will cause all subsequent tasks to remain stuck in the publication queue as well. The script timer will also not work, because it counts the time taken to switch between lines of code, which does not happen in this case.

To prevent the task from getting stuck because of the above, launch the external process using the Exec() command instead of the Run() command.

Sample script:

var wsh = new ActiveXObject("Wscript.Shell");
var ex = wsh.Exec(cmd);
while ( ex.Status == 0 ) {
 wsh.Run( "%COMSPEC% /c timeout /t 1 /nobreak > nul", 0, true );
}

26.03.2024 13:49:49

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.