3 Replies Latest reply on Jun 10, 2014 8:27 AM by richard mcleod

    Get Current JobRunId of NSH ScriptJob?

    richard mcleod

      Been pulling my hair out for a little while now... looked through many of the implementations here on communities and it seems the only way to get this value is to loop through all job runs and essentially guess at the current job (cross your fingers and hope for no collisions).


      Maybe I've been looking at this too long for today but I feel like my attempts so far at identifying the current jobrunid are futile. Is it really not possible through blcli to get this value (with 100% certainty?)


      Is there like an secret NSH env variable that stores this info for nsh script jobs? similar to $NSH_RUNHOST_CMD?



      Also unsure why this command fails, but I see there is an example in the blcli (unreleased) documentation for it...


      blcli_execute Job getJobDBKeyByJobId 893861

      Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundException: Name space : Job has no commands by name : getJobDBKeyByJobId