Skip to main content
Known Participant
Sep 22, 2025 10:40 AM UTC
Solved

Not able to start the process in 5 mins interval

Hi all,

I have a requirement where I need to call a process model in every 5 mins. Also if the minutes are in 5 series like 05, 10, 15... then only further process need to be executed. If I have started the process model at 9" 31 AM" then it should introduce the waittime of another 4 mins and then only execute further.

Current configuration -

1, Start node is configured with the constant -> just to ON and OFF the auto execution.

2.. Tried to find the required time and assigned that as a expression in "Delay until the date and time specified by this expression:" as below - 

a!localVariables(
local!now: now(),
local!minuteNow: minute(local!now),
local!extraMinutes: if(
mod(local!minuteNow, 5) = 0,
0,
5 - mod(local!minuteNow, 5)
),
local!adjustedDateTime: datetime(
year(local!now),
month(local!now),
day(local!now),
hour(local!now),
local!minuteNow + local!extraMinutes,
0
),
local!adjustedDateTime
)

Somehow Start node is not understanding and simply going ahead. The delay is not getting introduced.

How to achieve this?

shubhama926776
Brainy
Sep 22, 2025 11:48 AM UTC

Issue with you delay code, datetime values when local!minuteNow + local!extraMinutes exceeds 59.
The datetime() function will error because 60 minutes is invalid.

now() + intervalds(0, if(mod(minute(now()), 5) = 0, 0, 5 - mod(minute(now()), 5)), 0)


if above will not work try this
a!localVariables(
  local!now: now(),
  local!minuteNow: minute(local!now),
  local!extraMinutes: if(
    mod(local!minuteNow, 5) = 0,
    0,
    5 - mod(local!minuteNow, 5)
  ),
  a!addDateTime(
    startDateTime: datetime(
      year(local!now),
      month(local!now),
      day(local!now),
      hour(local!now),
      0,
      0
    ),
    minutes: local!minuteNow + local!extraMinutes
  )
)

शुभम्

4 replies

shubhama926776
Brainy
Sep 22, 2025 11:48 AM UTC

Issue with you delay code, datetime values when local!minuteNow + local!extraMinutes exceeds 59.
The datetime() function will error because 60 minutes is invalid.

now() + intervalds(0, if(mod(minute(now()), 5) = 0, 0, 5 - mod(minute(now()), 5)), 0)


if above will not work try this
a!localVariables(
  local!now: now(),
  local!minuteNow: minute(local!now),
  local!extraMinutes: if(
    mod(local!minuteNow, 5) = 0,
    0,
    5 - mod(local!minuteNow, 5)
  ),
  a!addDateTime(
    startDateTime: datetime(
      year(local!now),
      month(local!now),
      day(local!now),
      hour(local!now),
      0,
      0
    ),
    minutes: local!minuteNow + local!extraMinutes
  )
)

शुभम्
Known Participant
Sep 22, 2025 12:44 PM UTC

Thanks for your reply Shubham. It is working now  It is getting triggered in each 5 mins interval. Below is my process model and facing another issue now

I am getting the schedules dynamically. for example - at 11:45 I have to execute 5 processes - Process 1, Process 2. I am getting that list along with UUID (UUID i have stored in DB). Now when it is 11:45 the start process node gets executed and shows 2 instances. But when I check in monitoring tab it shows me double instances. in this case 4 instances Sharing below MNI setup.

In monitoring tab- 

Anything I am missing here?

Known Participant
Sep 22, 2025 12:46 PM UTC

Also this is happening only when process model is automatically triggered after 5 mins. When I manually trigger it.. It behaves properly.