Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to handle wait time btwn FTP tasks??

Status
Not open for further replies.

katbear

Programmer
Mar 14, 2007
270
US
Hi,

I have a package that will be using an FTP task to send a file (file1) to an ftp site.

Once the file (file1) is received at the ftp site, a corresponding file (file2) will be placed in the ftp directory, and then I will need to ftp the corresponding file (file2) back.

However, there will be a time delay between the time that file1 is received and file2 is put in the ftp directory. Maybe 5 to 30 minutes.

What is the best way to handle this scenario? I want to ftp file2 back as soon as it's available. However, I don't know when that is, and so I was wondering if there is a way to dynamically check for the availability of the file, so that I don't have to "hard code" a wait time into my process.

Thanks!

 
A seperate SSIS package that fires on the successfult transfer of your first file. Have this file loop every 1 minutes until the file is there.

Paul
---------------------------------------
Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
Do you mean, in the second package, create a ForLoop container?

How do I get to loop every 1 minute? Is there a setting for that? Or do I need to script this?

Even better, do you have an example?

Thanks!
 
Hi, In a SQL 2000 DTS pkg I do similiar by using a batch file to place the date stamp of the remote file into a local text file and then in next step use vbscript in the to make sure file is less than n mins old. Not that familiar SSIS ForLoops but think a "check and loop" or something similar could work for you!

Can post batch file and script details if you think its a poss.

Regards
Mark
 
Hi,

I figured out my solution, but thanks.

Using a ForLoop that has 2 containers in it.

One is an FTP task, the other is a Script Component that checks for the existence of the file on a local drive, which of course will exist after a successful FTP transfer.

It loops and loops (with 1 minute delay in the script) until the file is FTP'd, then when the file exists, my script sets a boolean value to true, and the ForLoop terminates on the boolean value being true.

SSIS rules (most of the time) :)


 
Glad to hear you have a solution. Sure I will have to do something similar in the future once we move to 2005 so good to know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top