Execute command and exit codes

Post Reply
netaware
Member
Posts: 24
Joined: Tue Jul 30, 2024 7:11 pm

Execute command and exit codes

Post by netaware »

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?
Flow8.png
Flow8.png (195.47 KiB) Viewed 762 times
Malcolm Mackenzie
Member
Posts: 126
Joined: Wed Mar 22, 2017 5:05 pm
Location: London, UK
Contact:

Re: Execute command and exit codes

Post by Malcolm Mackenzie »

In case you're still stuck.
The error out is set for the traffic light scheme.
You need two connections out.
1 for success
2 for error
Click the connector to set the lights.
You have pass/fail set on the same connection.
Post Reply