I have a similar challenge! I need to achieve the following:
- Check if the file is available on the SFTP site, if yes then download to local or shared folder.
- If the file is not available then wait for 2 hours until the file arrives. We can check this by polling every 30 minutes or so.
- Send out an email if the file does not come on SFTP after 2 hours.
I have achieved a certain level but stuck at third step! Need your help and support.
Please let me know if I can share my code (Preferably if you would like to receive it on your personal email).