Good afternoon
We have a problem with the delay of a start timer, the timer has to run every X minutes (set to a constant).We have created a rule to delay us so that the process runs at the exact minute.For example, if it's 6:26 p.m. and we run every 15 minutes and publish right now, what we want is to set a 4-minute delay so that the process doesn't start until 6:30 p.m.
The problem is that the process is not starting and we do not know what we are doing wrong.
The code:
load( local!intervalos: ( 60 / ri!duracion ) + 1, local!enumeration: enumerate( local!intervalos ), local!intervalosFinal: a!forEach( local!enumeration, fv!item * ri!duracion ), local!retardo: reject( fn!isnull, a!forEach( local!intervalosFinal, if( and( minute( local( now() ) ) > fv!item, minute( local( now() ) ) < local!intervalosFinal[fv!index + 1] ), local!intervalosFinal[fv!index + 1] - minute( local( now() ) ), null ) ) ), if( or( isnull( local!retardo ), local!retardo = "", length( local!retardo ) < 1 ), 0, local!retardo[1] ))
Do you know what the problem may be?
A greeting and thanks in advance
Discussion posts and replies are publicly visible