Hi all,
We have a 3rd party vendor who has a process for receiving data requests and sending data responses via FTP. I have briefly described the scenario below. I am trying to figure out a simple way to address this using VisualCron.
Scenario:
1) We FTP a "request" to the vendor. The "request" is just a text file with a payload that meets the vendor's specifications.
2) The vendor picks up the request, processes it, and prepares an output file.
3) When the processing is complete, the vendor places a file on the FTP server that acts as a signal that the request has been completed and that we can now pick up the actual results file. Basically a semaphore file.
What we need to do is "poll" the FTP server looking for this semaphore file and, if we see it, then FTP download the results file as well as the semaphore file. There is some cleanup we do afterward as well.
I am trying to think of a way to implement this logic in VisualCron.
The FTP task does not generate an error if I try to download a file that does not exist, so that crude approach for detecting the presence/absence of the file is out.
There is no easy way to get the FTP LIST command output and parse it that I can think of.
I could do something crude like this:
1) Attempt to FTP download the file (call it foo.txt) to a specific location locally
2) Look for the the local copy of foo.txt.
3) If foo.txt exists locally, proceed with the download of the results file
4) If foo.txt does not exist, loop back to the first FTP task and attempt to download foo.txt again.
Any suggestions would be greatly appreciated.
Thanks,
Chuck