13 Replies Latest reply on Oct 16, 2012 7:39 AM by Lazar NameToUpdate

    All Previous Jobs from Jobs folder get deleted automatically.

      Share This:

      Hi All,


      I have ran a script for deletion of old jobs, and previously This script was working fine bt i have a big doubt... at bold line:::


      blcli_execute SmartJobGroup groupNameToId "/some/job/folder_name/smartgroup"
      blcli_storeenv jobGroupId
      blcli_execute Job findAllHeadersByGroup ${jobGroupId}
      blcli_execute Utility storeTargetObject jobHeaders
      blcli_execute Utility listLength
      blcli_storeenv listLength

      echo ${listLength}
      for item in {0..$((${listLength}-1))}
              blcli_execute Utility setTargetObject jobHeaders
              blcli_execute Utility listItemSelect ${item}
              blcli_execute Utility setTargetObject
              blcli_execute SJobHeader getDBKey
              blcli_storeenv jobKey
              blcli_execute SJobHeader getObjectTypeId
              blcli_storeenv jobTypeId
              blcli_execute Delete deleteModelObjectAndDependentObjects ${jobTypeId} $


      When i have executed this script to respective job smart group, then the respective jobs from that particular JobsSmartGroup was deleted one by one but I don't know after a long time how the all other jobs were deleted from jobs folder and even my current running job was also deleted. Is it possible that these all jobs were deleted  from the "Jobs" folder because of this script run??? And is there any way to Restore them all??? i didn't performed any stuff by which the database may altered.


      plzz help Urgently..