I have a requirement for polling a directory for files and I am using tWaitforFile Components but facing one issue. Actually tWaitforFile provides option for seconds between iterations and no of iterations to exit out of infinite loop but I want to do file polling till specific time, suppose if job starts at 8 then till 10 I need to do file polling.
If would be great if anyone worked on the same scenario and share their approach.
In this scenario, you could use the tLoop component, tFileExists & tSleep.
However generally, I wouldn't recommend a Talend start and stay running, looping for an indefinite period of time - could you not just trigger the job to run every few minutes externally (from CRON or something) between 8 & 10?
as variant - combination
tLopp + tSleep + compare time from start:
at the begin in tJava save StartTime:
and compare it with current time for each iteration:
similar logic could be about absolute time
and also you can add in tLoop criteria && additional parameter - is FileReceived and put this to 1 for exit loop earlier
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema
Pick up some tips and tricks with Context Variables