Some questions and a proposal:
Why do you do a repeat loop around a timer??? What is the intent here?
This creates the same time three times which may have unexpected results.
Can we simplify the topic and just create the one timer only and remove the repeat loop?
What code is it creating?
if (cache.private.exists('MyTimer') === false || cache.private.get('MyTimer').hasTerminated()) {
cache.private.put('MyTimer', actions.ScriptExecution.createTimer('MyTimer', time.ZonedDateTime.now().plusSeconds(2), function () {
console.info('abc');
}));
};
Do you want the timer to run only three times and then stop? Because then the right way to do it is as follows:
Update note: As mentioned by Rich, there is a small mistake in the above image as it needs to be “cnt >=0”. Sorry for the confusion.

