4 Replies Latest reply on Dec 20, 2017 10:02 AM by Piotr Wroblewski

    How to schedule windows patching job through blcli?

    Piotr Wroblewski

      Hello Guys,


      I'm in need to schedule a lot of windows patching jobs and really would like to automate this, rather than create new schedule by hand on each server. I was trying to prepare some set of commands, but I got stuck on this:


      JOB_FOLDER="/Jobs/EQ/Patch Management/Remediation/Windows"


      JOB_KEY=`blcli PatchingJob getDBKeyByGroupAndName "$JOB_FOLDER" "$JOB_NAME"`

      DATE_STRING="03/24/2018 23:35:00"

      JOB_KEY=`blcli Job addOneTimeSchedule $JOB_KEY "$DATE_STRING"`


      After last command I'm getting following error:


      step01% blcli_execute Job addOneTimeSchedule $JOB_KEY "$DATE_STRING"

      Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundException: Found command 'Job.addOneTimeSch

      edule' but with mismatching arguments. : java.lang.IllegalArgumentException: Wrong number of arguments provided to metho

      d : addOneTimeSchedule expected : 2 received : 17


      Is there any way to schedule jobs by cli? Am I getting somewhere with those commands?