How to automatically Cancel (Fail) Step which is stuck (executing without end)?

Hi,

I have cases that I have some installation scripts for installing some software on Windows Machines, and if some parameters are wrong Project Step fails - which is OK since I will then correct mistakes and run the new Release once again for deployment.

But, I have cases when some parameters are not propagated (of course by mistake) and in that case my Deployment Step is just “loading”, that is - executing without the end. It’s definitely stuck and nothing will happen because not all parameters are propagated to the installing script.
I can CANCEL it manually, and then to correct errors, but is it possible to somehow cancel this “stuck” Deployment Step automatically? And how?
I am of course not sure what are the options, but since are deployment process should be completely automatic we need to have some automatic failing procedure in case that something cannot be installed (for example to cancel it automatically if some timeout period expires or if Octopus can maybe recognize that nothing is happening and so on…)

Thanks for advices!

Hi @veljkosbbb,

Thanks for getting in touch!

The main way of achieving this would be to add a timer of some sort to your script and regular check the status of the timer as your process runs. When it reaches the limit you set it would need to set it to return an exit code of 1.

There is an article on creating timeouts in scripts here that may help: https://blog.ipswitch.com/creating-a-timeout-feature-in-your-powershell-scripts

I hope this helps, please let me know if you have any further questions.

Regards,
Paul

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.