04-03-2014 09:44 PM - edited 03-01-2019 09:08 AM
Hello, Need some help with a file grabbing issue with my Tidal job. My job is scheduled to run from 3 PM to 9 PM daily repeating every 10 mins. The job looks for three files in UNIX directory /extractdirectory/ and when found, processes and moves them. Recently the job has been grabbing partial files as it was grabbing files before the copy process could complete. I setup a file dependency stable for 2 mins and when the files arrived at 4 PM six instances of the jobs ,which were waiting on dependency, fired at once. Is there a way I can stop the job from grabbing partial files and also only let one instance of the job run on the files?
04-04-2014 04:04 AM
Hi Vipin,
What you mean by partial files? How files are generated? Based on file generation/completion time, can you not run your tidal job? or probably you need to write a script to check the file size and do post processing accordingly.
Hope this helps.
Regards,
Zulfiqar
04-04-2014 06:42 AM
Hi Zulfiqar,
The files are copied into my directory /extractdirectory/ by an external process and I do not have any control over it. The files do not have a fixed size or fixed time of arrival. The three files totally take around 75 seconds to get copied completely. If the Tidal job happens to run within this 75 sec window then it doesn't get the complete data and it also does not wait for the copy to finish either before starting to work on the data.
Regards,
Vipin
04-07-2014 03:18 AM
Hi,
There's couple of ways you might go about this. One is to create a queue with a job limit of 1 and a filter for this particular set of jobs. If you use the File event variable <Filemon.Filename> then you can feed each individual instance of the file picked up to the associated job/group. This effectively stops multiple instances of the same job from stepping on each other.
You can also set the constraints on the File event eg "1 occurrence in x minutes".
The approach will vary based on your specific use case. However I would have thought the option in the file event "file size stable for" should get you where you need to be. A combination of stable file size, size > and a delay ought to guarantee success.
Cheers
05-28-2014 02:12 PM
Ive had this issue before. As the file is getting copied / downloaded to the monitored folder , the tidal job will be kicked off - sometimes before the file has finished copying.
The pure tidal solution to this is to choose the "file size stable for x minutes" field when setting up the file dependency.
06-11-2014 05:39 PM
Hi vipinsmarty,
Did you ever get this resolved? I am curious as to what is the arrival frequency for these files. If you know there are X number sets of files Y minutes apart between 3pm and 9pm time window, then instead of scheduling your job to run every 10 minutes, you should be able to configure your job to run with the following:
BR,
Derrick Au
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide