Automatically clean JOBS HOLD, ... on AJF

Everything about Control-M Server installation or setup.
Post Reply
User avatar
thierry-75
Nouveau
Nouveau
Posts: 7
Joined: 29 May 2008 12:00

Automatically clean JOBS HOLD, ... on AJF

Post by thierry-75 » 17 Aug 2011 3:42

Hi,

We have more and more jobs not removed automatically by the NDP. This is due to job in hold status, not killed, .... our users wait a long before cleaning its and I would like to force by a job this clean.

Do you have script for cleaning automatically those jobs ?

Many thanks for your help.

User avatar
matom
Nouveau
Nouveau
Posts: 37
Joined: 29 Nov 2006 12:00
Location: Ile de France

Post by matom » 23 Aug 2011 7:30

Hi

voici un/here is an example

#!/bin/sh

#-- Indiquer le nombre de jours pendant lesquels les jobs en HOLD doivent etre conserves
JoursConservation=10

#-- Calcul de la date avant laquelle on supprime les jobs en HOLD
DateLimite=`ctmstvar 0 '%%$CALCDATE %%ODATE -'${JoursConservation}`

#-- On charge dans une variable les OrderID de tous les jobs en 'HOLD'
ListeJobsHold=`ctmpsm -LISTALL |grep Hold | awk -F" " '$4<'${DateLimite}' {print $1}'`

#-- Delete de tous les jobs en 'HOLD'
for OrderId_a_Deleter in ${ListeJobsHold}
do
ctmpsm -UPDATEAJF ${OrderId_a_Deleter} DELETE
done


Lors de la procedure de montée au plan ces jobs seronts nettoyés de l'AJF
On NDP these jobs will be cleaned from AJF

Cordialement/Regards

Post Reply