Recursive timer between hours

Good Morning,

We are trying to configure a timer in the start node of a process that must have the following functionality, the process must run every 15 minutes every day between 04:00 AM and 06:00 AM.( that is, 9 times)

We have GMT (-3:00) so we were trying to do it as follows,

But I understand that with this condition it will run at both 04:00 PM and 04:00 AM

Would you have any ideas to help us?


Greetings and thank you

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Did you test this? hour() returns 0-23. Should be OK.

  • Right, excuse me and a question I am putting the condition in a rule because the values ​​of StartDate, EndDate, I must frequently collect them from the database, the rule is this:

    load(

    local!horaIni: split(
    local!fechaIni,
    ":"
    )[1],
    local!minutoIni: split(
    local!fechaIni,
    ":"
    )[2],
    local!horaFin: split(
    local!fechaFin,
    ":"
    )[1],
    local!minutoFin: split(
    local!fechaFin,
    ":"
    )[2],
    /*Se comprueban las condiciones para ver si el proceso debe ejecutarse o no*/
    if(
    and(
    time(
    hour(
    local(
    now()
    )
    ),
    minute(
    local(
    now()
    )
    )
    ) >= time(
    local!horaIni,
    local!minutoIni
    ),
    time(
    hour(
    local(
    now()
    )
    ),
    minute(
    local(
    now()
    )
    )
    ) <= time(
    local!horaFin,
    local!minutoFin
    ),
    local!activo = "S"
    ),
    true(),
    false()
    )
    )

    Where the values ​​of startDate, EndDate and asset are values ​​retrieved from bbdd(values ​​are string)

    and the frequency would be a query to bbdd that retrieves this value

    This is the timer setting

    Executing the rule separately returns true


    Do you know why the process does not start?

    Greetings and thank you

Reply
  • Right, excuse me and a question I am putting the condition in a rule because the values ​​of StartDate, EndDate, I must frequently collect them from the database, the rule is this:

    load(

    local!horaIni: split(
    local!fechaIni,
    ":"
    )[1],
    local!minutoIni: split(
    local!fechaIni,
    ":"
    )[2],
    local!horaFin: split(
    local!fechaFin,
    ":"
    )[1],
    local!minutoFin: split(
    local!fechaFin,
    ":"
    )[2],
    /*Se comprueban las condiciones para ver si el proceso debe ejecutarse o no*/
    if(
    and(
    time(
    hour(
    local(
    now()
    )
    ),
    minute(
    local(
    now()
    )
    )
    ) >= time(
    local!horaIni,
    local!minutoIni
    ),
    time(
    hour(
    local(
    now()
    )
    ),
    minute(
    local(
    now()
    )
    )
    ) <= time(
    local!horaFin,
    local!minutoFin
    ),
    local!activo = "S"
    ),
    true(),
    false()
    )
    )

    Where the values ​​of startDate, EndDate and asset are values ​​retrieved from bbdd(values ​​are string)

    and the frequency would be a query to bbdd that retrieves this value

    This is the timer setting

    Executing the rule separately returns true


    Do you know why the process does not start?

    Greetings and thank you

Children