Execute command and exit codes
Posted: Tue Aug 05, 2025 6:34 pm
I am using the Execute command app to run a Powershell script. This works fine.
But the trouble I am having is when the command fails and the exit code is 1, I would like the job sent to the problem jobs folder, but they are not going there. I see a message in the web portal.
Currently I am testing with a very simple PS command, that should fail and send the exit to the batch file.
I have tested this in a command prompt window and there i get the correct exit code.
Can someone please tell me what i am doing wrong? Why this job, which is meant to fail, going to the problems folder?
But the trouble I am having is when the command fails and the exit code is 1, I would like the job sent to the problem jobs folder, but they are not going there. I see a message in the web portal.
Currently I am testing with a very simple PS command, that should fail and send the exit to the batch file.
I have tested this in a command prompt window and there i get the correct exit code.
Can someone please tell me what i am doing wrong? Why this job, which is meant to fail, going to the problems folder?