Skip to main content
September 22, 2025
Solved

Not able to start the process in 5 mins interval

  • September 22, 2025
  • 4 replies
  • 0 views

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?

Best answer by shubhama926776

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
September 22, 2025

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
  )
)

September 22, 2025

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?

September 22, 2025

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