Hi Nitin Pande,
We tried using link jobs triggered on failure or success did not work (even with time-delay setup in the link job) because the predecessor SFTP job fails before force complete - job failure (though the state is present only for few seconds) gets captured by the link job.
We also tried using JavaScript in the link job but it didn't work as expected (we are yet to explore the reason behind it).
However, we created a link job for each SFTP job to handle notifications. The link job runs only if the SFTP job has failed (exit code 1). The link job is configured with a 1-minute delay:
- If the SFTP job is force-completed within that minute, the link job does not run.
- If the SFTP job is still in FAILED state after 1 minute, the link job runs and completes, sending a notification email (PagerDuty alert) that the SFTP job FAILED.
We also had setup another Alert in the services perspective - added in the SFTP job. If the SFTP job succeeds (Completed or Force Completed by the previous Alert), this new Alert ensures that the link job is force-completed successfully, preventing false failure notifications.

We've tested the approach, and it's working as intended.
Regards,
Thendral
-------------------------------------------
Original Message:
Sent: Sep 18, 2025 10:06 AM
From: Nitin Pande
Subject: Exit codes in SFTP jobs
Hi,
You can setup two link jobs. One will release on failure, and another on success. Then link jobs then connect to your successor jobs. Here is screenshot for the jobs, see if that helps. You can setup your Javascript in the link job based on fail or completed.
HTH,
Nitin Pande
------------------------------
Support
Broadcom
Toronto
------------------------------