Stability of Workbench when run from command line
I have a project in which I am automatically running Workbench. I have a Python 3.* script which runs Windows Command Line, which calls a Workbench project (with 1 mechanical system). It does some data i/o, runs an analysis, then outputs the result.
I call this iteratively, hundreds of time through my Python script.
I am encountering a problem where, for no apparent reason, the Command Line entry (calling Ansys) gets stuck. Normally when my script starts Ansys, I get a nice CMD window with the Workbench coding showing. On occasion, the CMD window opens, but no text shows. My script is waiting for the output of Ansys, which never runs.
This happens maybe 1 in 1000 times. I can run the same data again, without the problem replicating. It is very inconvenient as it renders my script run (taking many hours) useless.
I have had some success avoiding this by adding a 20s delay before each time my script runs Ansys, however it has not eliminated the problem. My thought here was that it could be an issue with delay of licenses checking in/out.
I am looking at ways to program around this in Python, but wondered if anyone has any similar experience / solutions.