Watch file for specific time interval

Six Stars

Watch file for specific time interval


I need to implement a job that will watch file for specific interval and generate notification.



Fifteen Stars TRF
Fifteen Stars

Re: Watch file for specific time interval

Schedule the task with the desired interval (using TAC or an external scheduler) or use tSleep to introduce the wait strategy into the job.

In this case you should anticipate a condition to break the infinite loop.

Thirteen Stars

Re: Watch file for specific time interval

all what suggested by @TRF, also:


- look for ESB, where You can create route which monitor folders

- Use remote agents with could ship files (or file content)


last also allow tail file in "real-time" to message queue


Six Stars

Re: Watch file for specific time interval



This is what I need to implement

System should perform below validations for file reception
 - File should be received by stipulated (configured time) time for particular Issuer
 - For each issuer two files should be present – Main and Meta

 If file not received by stipulated time, then system should retry up to configured number of times
 - System should retry after configured duration


Can you please elaborate how to implement this. The directory that needs to be scanned will have multiple files coming , I need to scan this folder, read these files and do validations and processing.


Appreciate your co-operation and timely help.



Pravin Sanadi

Thirteen Stars

Re: Watch file for specific time interval

- Schedule Job as usual - by any scheduler


Job structure:

- tLoop with number of iteration what You want to re-try

- iterate to next steps:

- tFileExists for both of files 

- trigger IF exists both - run all steps and exit Loop

- trigger IF not exists both - tSleep for predicted number of seconds

- after tSleep if number of current iteration == maximum defined - notify about unsuccessful execution



Above - simple sequence for single issuer, but You can extend it for iterate thru all defined issuers


What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now


Introduction to Talend Open Studio for Data Integration.


Downloads and Trials

Test drive Talend's enterprise products.


Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.