We have a requirement to trigger notifications after any SFTP failures with our clients. We use a in-house notification executable which we are calling through VisualCron (this process works fine). I need to pass the SFTP error to the notification program but I'm having an issue figuring out how to write the variable.
What's the best way to write an error from an SFTP session into a short-term variable? We are sending arguments similar to the following to the executable: -t 11 -r 1 -f "SFTP Failure" and would like "sftp failure" to be the error code from that specific session.