FTP to second FTP server on Failure

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.

FTP to second FTP server on Failure

Postby crofte » Wed Dec 07, 2011 1:59 pm

Can you create a project to FTP a file to a remote server, and if the project fails for any reason, (after a few retries) FTP to another FTP server
crofte
 
Posts: 2
Joined: Mon Dec 05, 2011 8:18 am

Re: FTP to second FTP server on Failure

Postby RElliott63 » Fri Dec 09, 2011 5:30 pm

This could be easily done by either calling separate modules or reading a Spreadsheet or Database Table for your IP addresses:

Pseudo code for Calling separate modules (assuming you only have 2 IP Addresses):

Code: Select all
<Module Main <dependsOn=FTPMain,FTPAlternate>
   ...Print Success Message (If ftpError eq 0)
   ...Email Notification (If ftpError gt 0)
</Module>

<Module FTPMain>
   <setVariable label="Set ftpError" version="1.0" name="ftpError" value="0" />
   <FTP ResourceID=<1st IP Address> ..... onError="setVariable:ftpError=1">
   ...
   ...Do something if ftpError=0...
</Module>

<Module FTPAlternate executeOnlyIf="${ftpError} gt 0>
   <setVariable label="Set ftpError" version="1.0" name="ftpError" value="0" />
   <FTP ResourceID=<1st IP Address> ..... onError="setVariable:ftpError=1">
   ...
   ...Do something if ftpError=0...
</Module>


The Pseudo Code for reading the IP Addresses from a Spreadsheet or Database would entail your use of multiple projects.. using a callProject within a loop reading the records. If you need help with this, please let me know... I have some examples.

Hope this helps...

-Rick
RElliott63
 
Posts: 14
Joined: Thu Jul 01, 2010 10:42 am


Return to Community Forum

Who is online

Users browsing this forum: No registered users and 2 guests

cron