2 Replies Latest reply on Dec 22, 2017 10:34 AM by vijay Chaudhery

    Adding last execution time into nsh Script Output

    vijay Chaudhery

      Hi, I have a script to find out total server count in the BL console windows folder and want to get the last time when Job executed , so that would get data on which date, for this I am trying to use as below.

       

       

       

       

      JOB_GROUP="/NSH Script Job"


      JOB_NAME="Windows Server count"


      echo  "JobName : $JOB_NAME"


      echo  "JobGroup : $JOB_GROUP"


      JOB_KEY=`blcli NSHScriptJob getDBKeyByGroupAndName $JOB_GROUP $JOB_NAME`


      echo  "JOB_KEY: $JOB_KEY"

       

      but when I give the job group name which space it would not recognize the job folder name , can someone please let me know how to provide the correct path into this command?? Or the best way to get the last execution time?

       

      Only issue with Job folder path into the script which nsh script not able to figure out.

       

       

      Error 12/21/2017 17:01:01 Unknown command : name space = 'NSHScriptJob', command = 'getDBKeyByGroupAndName'.com.bladelogic.om.infra.cli.factory.CommandNotFoundException: Found command 'NSHScriptJob.getDBKeyByGroupAndName' but with mismatching arguments. : java.lang.IllegalArgumentException: Wrong number of arguments provided to method : getDBKeyByGroupAndName expected : 2 received : 4

       

      Info 12/21/2017 17:00:58 JobGroup : /NSH Script Job
      Info 12/21/2017 17:00:58 JobName : Reboot_Status_Portal