9 Replies Latest reply on May 27, 2015 10:51 AM by Bill Robinson

    What is the best/recommended way to delete old jobs in BSA?

    Yanick Girouard

      Say we have thousands (as in, over 15,000) jobs that were manually created in the console, but never archived or deleted. Then say we are trying to run an ETL and that it keeps on failing because of the sheer size needed for the TEMP tablespace (especially the JOB_PROPERTY_INSTANCE scenario).

       

      If I wanted to delete all the jobs that are older than X amount of days, what would be the best approach to achieve this since the cleanup commands only touch the auto-generated jobs?

       

      Needless to say we need to review our methods to avoid creating so many jobs, but in the meantime, we're stuck with a huge history of jobs we need to delete. I have a an idea on how I could do this, but I'd like to hear yours in case someone has a better one. So far this is what I thought about:

       

      1. Use a script to dump the name and paths of jobs older than a certain date, within a given set of job folders and dump that into a CSV file.

      2. Use a NSH script to loop through that list and delete each job (with dependencies) using blcli, -- or -- rename and move it to an archive folder so it can be deleted in batch via the console later.

       

      Thoughts?