cancel
Showing results for 
Search instead for 
Did you mean: 

Pick files older than 10 minutes

Former Member
0 Kudos

Hi Experts,

I have a requirement to pick files from a directory which are older than 10 minutes. Is this possible using seder file communication channel?

Thanks a lot.

Regards,

Prasad

Accepted Solutions (1)

Accepted Solutions (1)

alex_cook
Active Participant
0 Kudos

Howdy,

I haven't tried it but look for an option called Msecs to wait before modification check in the advanced settings of the sender comm channel - if it will let you set it to 6000000 then it might do what you want it to do.

Just a thought - let us know if it works.

Cheers

Alex

Former Member
0 Kudos

@ Alex

Msecs to wait before modification check

This won't work. The usage of this option is completely different from what the user wants to achieve.

alex_cook
Active Participant
0 Kudos

Howdy,

I'm aware of what the option is for. But doesn't it stand to reason that if your poll interval is 1 min and you use the modification check to wait for 10 mins then your comm channel will only process files older than 11 mins?

Of course it assumes that you are processing files within 10 mins of their arrival in the directory and not a longer interval, and it also assumes that the files are being created from the legacy system directly into the source directory from the communication channel.

However if both of those apply then its at least worth trying out. Unfortunately my current customer doesn't have a PI box for me to try it myself.

Cheers

Alex

Former Member
0 Kudos

@Alex, To me your approach looks good though I have not tested but it seems that it will work.

Former Member
0 Kudos

@ Alex,

But doesn't it stand to reason that if your poll interval is 1 min and you use the modification check to wait for 10 mins then your comm channel will only process files older than 11 mins?

This option is meant for NFS only and not FTP. And of course, it is not clear from the question whether the file channel user is talking about, is referring to FTP or NFS.

Former Member
0 Kudos

Thanks a lot Alex. Your solution works for my requirement. I am using NFS so it works fine for me.

Regards,

Prasad

Former Member
0 Kudos

Hi, I realized that this solution works only with one file. When I placed 3 files all at the same time, each file got picked up with an interval of 10 minutes. But my requirement is to pick all the files after 10 minutes.

Regards,

Prasad

Former Member
0 Kudos

Just follow what I have described here..

Former Member
0 Kudos

You can do as Sarvesh suggested, but the best option is to use a script. Delay in mapping is a solution but not the best way out

Former Member
0 Kudos

Yes, I agree with you. I do not want to hold the message in IE for 10 minutes consuming the resources, so I am opting to go with script. Thanks a lot for all your inputs.

Answers (2)

Answers (2)

Former Member
0 Kudos

> I have a requirement to pick files from a directory which are older than 10 minutes. Is this possible using seder file communication channel?

Why so? If the reason is to just provide some delay to process the data after an interval of 10 mins then probably you can put a delay in your mapping. Of course this is not a good solution but it will solve your purpose.

To put delay in mapping you need to create an UDF and then map the UDF to any parent node. [_Here is the code._|http://wiki.sdn.sap.com/wiki/display/Snippets/AddTimeDelayingraphicalmessageMapping]

Otherwise writing an script will be a good solution but for that you have to maintain 2 directory one in which your file will wait for 10 mins and then script will move it to another dir from where your file adapter will pick up the file.

Former Member
0 Kudos

Not directly. You might have to use the script at the FTP server level to handle this.