I have a script that executes another application (an automated test application) as part of a scheduled job. During the execution of the test the powershell script is on a wait, monitoring for process end of the test so that it can log the test result and move onto the next test.
The test takes 2+ hours to run. During this time the test software will hang / suspend / pause (generally after about 20 minutes).
When the test software gets stuck, killing the PowerShell process in task manager will cause the test application to immediately resume without issue, indicating that something is happening to powershell process that is affecting the test process as it is a child-process.
I do NOT believe this relates to the powershell setting to do with text selection, as I have already made that change with no effect. Powershell is also not sitting waiting for a keypress, as this behaviour is seen even running outside of the scheduled task.
I uses a system.Diagnostics.Process object with a ProcessStartInfo to launch the test software with arguments. I utilise Process.WaitForExit to wait for the test to complete and test application to close to analyse the log file it produces.
Any thoughts on the cause and fix of the powershell hang?
many thanks
1