1 of 1 people found this helpful
The average runtime of jobs are obtained only after executing ctmjsa. Usually a daily job is scheduled in Control-M to automatically execute ctmjsa "*" at a particular time. %%AVG_TIME will only be up to date after executing ctmjsa. For example, if a job executes multiple times per day, %%AVG_TIME will remain until it's updated with another execution of ctmjsa.
Thanks for your reply.
ctmjsa is scheduled to run on a daily basis: in fact, I see the value retrieved change from one day to the other.
The issue occurs when more than a job send that type of notification on the same ODATE.
For instance, this is what I got from 2 different jobs which ran on the same day:
- Job 1 - Mail message from CONTROL-M: Job 1 has exceeded 25% average runtime - 577.66
- Job 2 - Mail message from CONTROL-M:Job 2 has exceeded 25% average runtime - 577.66
577.66 is the value retrieved through %%AVG_TIME variable.
The body of message is as following:
%%JOBNAME has exceeded 25% average runtime - %%AVG_TIME
Any idea of why the average runtime is the same for 2 different jobs?
They have completely different runtimes.
Not sure why %%AVG_TIME are the same for the 2 jobs. To investigate, you can retrieve the average runtime by executing the utility ctmstats on the Control-M server. Try the following 2 commands:
1. ctmstats -list "*" -jobname <name of job 1>
2. ctmstats -list "*" -jobname <name of job 2>
%%AVG_TIME should be the same value as the average elapsed time shown by the above commands.