axcrules TIME Rule with EVERY specification not triggering as expected
search cancel

axcrules TIME Rule with EVERY specification not triggering as expected

book

Article ID: 258142

calendar_today

Updated On:

Products

Automation Point

Issue/Introduction

I have defined an axcrules TIME rule with EVERY(5 SECONDS) specified, but it is instead triggering on one-minute intervals.

*TOD GetCaseID
TIME(00:00), EVERY(5 SECONDS) REXX(GetCaseID.rex)

Example:

01/13/2023 13:36:01 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:37:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:38:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:39:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:40:01 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:41:01 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:42:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:43:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:44:01 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:45:01 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:46:01 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:47:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:48:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:49:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:50:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:51:01 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:52:01 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:53:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:54:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:55:00 <GETCASEID.REX> to keep track of execution interval
01/13/2023 13:56:00 <GETCASEID.REX> to keep track of execution interval

13:55:00.244 S0 P5460 T5044 C=NA Task=20  RULES TIMER: (rex_queue,100,I)   AXC0768I REXX program   queued: getcaseid.rex, [1]
13:55:00.260 S0 P5460 T180  C=NA Task=37  SVX - GENERAL CMDS: (svx_write_to,100,I)   AXC0766I REXX program  started: getcaseid.rex 
13:55:00.698 S0 P5460 T5412 C=NA Task=64  SVX - GENERAL CMDS: (svx_write_to,100,I)   AXC0767I REXX program finished: getcaseid.rex 
13:56:00.336 S0 P5460 T740  C=NA Task=28  RULES TIMER: (rex_queue,100,I)   AXC0768I REXX program   queued: getcaseid.rex, [1]
13:56:00.351 S0 P5460 T3664 C=NA Task=60  SVX - GENERAL CMDS: (svx_write_to,100,I)   AXC0766I REXX program  started: getcaseid.rex 
13:56:00.978 S0 P5460 T8344 C=NA Task=85  SVX - GENERAL CMDS: (svx_write_to,100,I)   AXC0767I REXX program finished: getcaseid.rex 

How can this be configured so the rule executes every 5 seconds as expected?

Environment

Release : 11.7

Resolution

The problem with the 5 second TIME rule only executing every 60 seconds was caused by the following default setting in Configuration Manager: 

Config Mgr =>  Expert Interface => Automation => Session Definition Sets => Session Definition Set 1 => Rules Settings:

Evaluation Frequency

Specifies a time interval, in seconds, for how frequently CA Automation Point time rules are evaluated in a specific session. Specify a value from 2 to 2100; 2100 seconds equals 35 minutes.

Default: 60

In this case, even though the TIME rule interval was set to 5 seconds, AP only evaluates the TIME rules every 60 seconds.

The Evaluation Frequency "could" be set to a value less than or equal to 5 seconds, but this approach may lead to performance problems in the server due to having to scan the rules database every 5 seconds or less.

Better options to eliminate the possibility of server performance impacts:

Option 1: Leave the default Evaluation Frequency value at 60 seconds and TIME rule interval no less than 60 seconds if possible.

Option 2: Create a REXX as follows:

DO FOREVER
<The code that needs to execute every 5 seconds>
ADDRESS AXC "WAIT 5"
END

Execute the script at AP startup. The code between the DO - END instructions will execute every 5 seconds with a minimal impact on performance of AP.