Wait-Job timeout not working on PowerShell Core on Linux

%3CLINGO-SUB%20id%3D%22lingo-sub-742009%22%20slang%3D%22en-US%22%3EWait-Job%20timeout%20not%20working%20on%20PowerShell%20Core%20on%20Linux%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-742009%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20-%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20having%20trouble%20with%20the%20Wait-Job%20cmdlet%20on%20PowerShell%20Core%20for%20Linux.%20I%20have%20a%20Job%20created%20with%20Start-Job%2C%20which%20I%20wait%20for%20with%3A%3C%2FP%3E%3CPRE%3EWait-Job%20%24job%20-Timeout%2030%3C%2FPRE%3E%3CP%3EWhich%20should%20timeout%20after%2030-seconds.%20However%2C%20the%20command%20consistently%20hangs%20for%202-minutes%20before%20it%20completes.%20Am%20I%20doing%20something%20wrong%3F%20I'm%20running%20PowerShell%206.2.0%20on%20Ubuntu%2016.04.6%20LTS.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EMany%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-742009%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Visitor

Hi - 

 

I'm having trouble with the Wait-Job cmdlet on PowerShell Core for Linux. I have a Job created with Start-Job, which I wait for with:

Wait-Job $job -Timeout 30

Which should timeout after 30-seconds. However, the command consistently hangs for 2-minutes before it completes. Am I doing something wrong? I'm running PowerShell 6.2.0 on Ubuntu 16.04.6 LTS.


Many thanks!

0 Replies