9 Replies Latest reply on Feb 13, 2012 7:26 AM by Bill Robinson

    Extracting Information from Job Header

      I was trying to use a previous thread (https://www.bladelogic.com/community/thread.jspa?messageID=17535&#17535) as a guide, but I couldn't seem to find a method of extracting the same information from Job Headers (com.bladelogic.model.base.header.SJobHeaderImpl@e1eea8).


      The short version of what we are attempting: We have a number of batch jobs that run very frequently (every 5 to 7 minutes). We have jobs that have been setup to delete the history on the non-batch jobs with great success (without deleting the history, these jobs become impossible to manage), but all attempts to delete the history from batch jobs have met with failure. We had then thought that we could delete the member job run history and that would alleviate the problem.


      To delete non-batch histories, we modeled after something we found here and came up with a script that:


      "JobRun findAllRunKeysByJobKey" - gets all keys.

      "JobRun getStartTimeByRunKey" - determines when the start was and compares that to a window based upon the length of history we want to keep.

      "Delete deleteModelObjectAndDependentObjectsPS" - delete the objects we no longer need.


      What we're trying for the batch jobs is to:

      "BatchJob findAllSubJobHeadersByBatchJobKey" - get a list of the members of the batch

      Then run over the steps above.




      Thank you,


      Brian Emord