Release all jobs when oldest job is X hours

Post Reply
bahlqvist
Newbie
Posts: 2
Joined: Mon Sep 17, 2018 3:06 pm

Release all jobs when oldest job is X hours

Post by bahlqvist »

Hi guys.

I'm looking for a way to collect jobs over the course of, say, 10 hours (or 3 days or whatever) and when the oldest job has been on hold for 10 hours I want to release all waiting jobs. And then it starts over when the next job arrives. Is there a way to achieve this without using scripting?

Cheers!
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: Release all jobs when oldest job is X hours

Post by freddyp »

In "Assemble job" choose "Scheme - Arbitrary files". There are three properties that determine what jobs to assemble, "Every N jobs", "Every N minutes" and "After N minutes".

The principle is that whatever comes first will trigger the assembly. It seems to me that what you want is "After N minutes" set to 600, and the other two set to 0. This means the following: there is nothing there, a job arrives and the clock starts ticking, 600 minutes later everything that is there (that 1 job, or 183 jobs) gets assembled, the clock is reset and the wait for the next job begins.

If you add "Every N jobs" and set it to 100, then 100 jobs will get assembled even if the 600 minutes are not past yet.

If you add "Every N minutes" and set it to 1440 (1 day), then every day at a certain time (the time of starting the flow) the element will assemble everything that is there, which might be just 1 job that arrived in the flow just 5 minutes ago.
Post Reply