It is currently 23 Oct 2017 7:05


Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 02 May 2015 6:50 
Offline
Nouveau
Nouveau

Joined: 02 May 2015 6:42
Posts: 3
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.


Top
   
PostPosted: 03 May 2015 10:25 
Offline
Nouveau
Nouveau
User avatar

Joined: 26 Apr 2005 12:00
Posts: 696
Location: PARIS
Follow this link

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

Search third you will have several returns


Top
   
PostPosted: 04 May 2015 9:03 
Offline
Nouveau
Nouveau

Joined: 02 May 2015 6:42
Posts: 3
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


Top
   
PostPosted: 08 May 2015 8:17 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Jan 2006 12:00
Posts: 473
Hi,

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

_________________
Best regards
Walty


Top
   
PostPosted: 08 Jul 2015 3:26 
Offline
Nouveau
Nouveau

Joined: 02 May 2015 6:42
Posts: 3
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.


Top
   
PostPosted: 28 Jul 2015 8:38 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Oct 2008 12:00
Posts: 12
Location: Bangalore,Karnataka
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....


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved