cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
938
Views
0
Helpful
6
Replies

Job Triggered by File event needs to timeout if dependency isn't met by end of max duration

lstafford1
Beginner
Beginner

I am having trouble setting up a scenario in which my job will time out if it goes passed the max duration that I have specified.

The parent job is the job that is called with a job action from a file event.  I expect the parent job to complete abnormally if it is running past 2 min.  I have set the max duration for 2 min and have an event that is triggered when the "Job running past end of its time window" this calls a system action that will complete the job as abnormal.  This doesn't seem to be working.  What event trigger should I use?

Thank you in advance,

Lee

6 Replies 6

Derrick Au
Enthusiast
Enthusiast

Hi Lee,

Try Job is running longer than its maximum run time.

BR,

Derrick Au

I have tried that one as well, but I wonder if it doesn't consider it "running" yet because it is waiting on a dependency.  The dependency that it is waiting on is a file dependency of greater than 0KB.  The job was triggered by a file event because a file was dropped, but the file is 0KB and I do not want it to process any further.  I would like the job to complete abnormally so that I will get an email notification.  I just can't seem to get it to "time out".

Hi Lee,

That's correct, it's not running unless the file dependency is met. So that wouldn't work for you. Is your job running a script that checks for filesize? If it is 0KB then sleep for 120+ (more than 2 minutes) then that should trigger the event when job is running longer than its maximum runtime (assuming that the file is greater than 0KB AND regular processing takes less than the maximum runtime).

BR,

Derrick Au

I like this suggestion.  I could run a script to check for file size after it has been launched.  I was hoping that I could utilize something already built into Tidal without using a script, but it doesn't sound like I would be able to accomplish all that is needed with anything that is already built in Tidal.

Thanks for your suggestion.

To me, this is doubling your work. I would set the file event to only trigger if the file is a certain size and then have it insert the job.  This will keep your job from trying to run against an empty file.

Thank you for your suggestion.  I could set the file event to trigger based on the file size, however I need the job to kick off regardless of the file size so that I get a notification to let me know that the file was found but not valid.  I do not have control over the creation of the original file but unfortunately once it is dropped in that location, I have to move it, even if it is a 0KB file.  If it is 0KB, I need to be notified.

Thanks again for the suggestion but in this particular case I need to be notified if the file can't be processed.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: