You say "Job runs once ALL "and" triggers are failing.
You misquoted me, I said "... once ALL 'and' triggers
have fired.".
You are still thinking of waiting as if it needs to be coded specifically to wait. It doesn't.
Currently, the way Triggers work right now is that they react right away - they do not wait on anything.
That's fine, and they can keep working that way. Just add a "fired" flag (call it whatever you want), and add logic to set the flag for the trigger that just fired, and then
before running the job, check to see if there are other triggers. If there are, and they have already "fired", the go ahead and run the job. If any have not fired, then DO NOTHING (waiting is doing something, you don't need to wait, just exit). Other "and" triggers will fire later to run the job (once all other trigger flags have "fired"). The last trigger that fires is the only one that will actually run the job.
What do you think should reset this Trigger, i.e. when is it possible for the AND Triggers to fire again? Let's say Trigger A fires 5 times then Trigger B fires. So, in your case, the Job starts. Should Trigger B wait for another 4 times? Or is it reset at that moment when the Job has been run?
We could have quite a discussion about this. But for now to keep it simple, just reset the flags if the Job runs. it doesn't matter how many times a trigger fires as long as it fires at least once, it is flagged.
The only catch is: what if the job does not run at all for "today" (because one of the triggering events never occured, like in my example, Job A never ran)? The flags could interfere with the same job running in the next day (cause it to run prematurely). This is where the discussion grows, and I can tell you how it works in Tidal, but let's save that for another time. So perhaps you could add another attribute (time limit?) to a trigger so the user can indicate when a "fired" trigger should reset if the job hasn't yet run (may never run). Or this attribute could be global in nature, say a start-of-new-day time, that would clear all trigger flags? Just thinking out load now.
I welcome your thoughts...