?
If restarting fixed it, then the "hanging" was in the service, likely the agent never reported back that the "job" (a very small unit of work, not an Otter job) was complete. Once we add cancellation to the UI, you could confirm that to be the case...
Note that, as soon as the Otter service stops, the job will stop running, so the service won't be able to start itself back up. So you will need to have an external process running that will handle the restart, like this:
$script =
"
sleep 10
`$svc = (Get-Service -ComputerName 'inedoappsv1' -Name 'INEDOBMSVC')
Try { `$svc.Stop() }
Catch { }
`$svc.WaitForStatus([System.ServiceProcess.ServiceControllerStatus]::Stopped)
`$svc.Start()
"
Start-Process -FilePath 'powershell.exe' -WorkingDirectory 'C:\Projects\BuildMaster' -ArgumentList @('-NoProfile', '-ExecutionPolicy', 'unrestricted', '-Command', $script)
Write-Output 'BuildMaster will be deployed in 10 seconds'
It is the relevant parts of a PS script we use to have BuildMaster deploy to itself; it seems to work pretty well.