Scheduler Usage
http://scheduler-usage.com/

Shout to trigger on third consecutive failure of cyclic job
http://scheduler-usage.com/viewtopic.php?f=17&t=4031
Page 1 of 1

Author:  AD Control-M [ 02 May 2015 6:50 ]
Post subject:  Shout to trigger on third consecutive failure of cyclic job

Hello All,

There is cyclic job which executes every day with re-run interval 30 mins.

I would like to ignore 2 failures and send ended not alert only on third failure.

ON STATEMENT *
CODE OK
DO SETVAR \FAILCNT 0
ON STATEMENT *
DO SETVER %%FAILCNT %%PLUS 1

ON FAILCNT=3
DO NOTOK

Can we achieve something like this or if anyone can suggest better way for this requirement.

Author:  fyot [ 03 May 2015 10:25 ]
Post subject:  Re: Shout to trigger on third consecutive failure of cyclic

Follow this link

viewtopic.php?f=29&t=3821&hilit=third

Search third you will have several returns

Author:  AD Control-M [ 04 May 2015 9:03 ]
Post subject:  Re: Shout to trigger on third consecutive failure of cyclic

hello Fyot,

Thank you for reply.

But my requirement is not runcount specific. as its cyclic job it will run throughout the day.

I want to ignore consecutive two failure, alert should not be sent to GAS only if job is failing continuously three time then it should post alert and change status to ended not ok

Author:  Walty [ 08 May 2015 8:17 ]
Post subject:  Re: Shout to trigger on third consecutive failure of cyclic

Hi,

look this topic http://www.scheduler-usage.com/viewtopic.php?f=29&t=188

Author:  AD Control-M [ 08 Jul 2015 3:26 ]
Post subject:  Re: Shout to trigger on third consecutive failure of cyclic

Hi Watty,

Thanks for reply. But in the method you suggest it will still post should to GAS.

My requirement is , job should not send shout for two consecutive failures which means actually we can perform step DO OK only for first two failures and on the third consecutive failure, alert should be generated.

Author:  SreeMahi [ 28 Jul 2015 8:38 ]
Post subject:  Re: Shout to trigger on third consecutive failure of cyclic

This is something tricky....

to achieve this you need a Script or Batch file which you need to invoke upon failue by sending a value as parameter.

Step 1: Set one variable called varFailedCount in server with 0
ctmvar -action set -var '%%\varFailedCount ' -varexpr "0"

Step 2: Define a script which will set the value passed by the job upon Failure
NewFailCount = $1 + 1
ctmvar -action set -var '%%\varFailedCount ' -varexpr "$NewFailCount"

Step 3: Define Shout Destination as Program and run in Server as Logical Name: VarScript and Physical Address: Script Path

Step 3: Define a shout which will trigger the script upon FAILURE
When ENDED NOTOK To: VarScript Message: %%varFC

Step 4: Set a Variable value to varFailedCount in the steps tab (v7) Or Variables section (v8)
%%varFC Value:%%varFailedCount + 1

Step 5: Set up On-Statement
On Stmt: * Code: OK
Do Shout To: VarScript Message: 0

On Stmt: * Code: varFC EQUAL 3
Do Mail: Your Mail.....

Hope this helps....

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/