Job Utility Script

Version 1

    This script manipulates There are multiple modes this can operate in, and this can be the basis for other user-defined actions:

    setParallelProcs - sets the value of the Parallel Procs to either a defined value or whatever the default is in the database
      This can be useful if you need to quickly ensure that all jobs are set to run with limited parallelism
      example: nsh jobUtility.nsh -m setParallelProcs -r 20
    setDefaultPropertyValue - resets a property value back to the default value.
      example: nsh jobUtility.nsh -m setDefaultPropertyValue -p JOB_PART_TIMEOUT
    setPropertyValue - sets a property value on the jobs
      example: nsh jobUtility.nsh -m setPropertyValue -p JOB_PART_TIMEOUT -b 60
    removeJobRuns - removes all job runs associated with the job
      example: nsh jobUtility.nsh -m removeJobRuns

    The setDefaultPropertyValue and setPropertyValue can be easily done in the gui, but I like the commandline
      and sometimes that's just what works
    The -o option will let you specify a single type of job to act on,
    example: nsh jobUtility.nsh -m removeJobRuns -o SNAPSHOT_JOB
    The -g option will let you specify a specific static job group to look in
    example: nsh jobUtility.nsh -m setPropertyValue -p JOB_PART_TIMEOUT -b 60 -g "/Workspace/SomeJobs"

    Usage: usage -d <level> -m <scriptMode> <args>
    -d <debug level>  Debug Log output, level 0-5.  Should be first option (int)
    -m <scriptMode>        Mode of the script from above
    -o <modelType>   Single Job Type to process
    -s <dryRun>         Do this as a dry run and don't change anything (true/false)
    -g <jobGroup>   Individual Job Folder to run against
    -p <propertyName>  Property Name, for use w/ setCUJProperty and setCatalogObjectProperty
    -b <propertyValue>  Property Value, for use w/ setCUJProperty
    -r <int>    Number for parallel processes to set