Local or Remote Commands to Wait,Terminate or Proceed with Job Queue / Multi-Row

BatchPatch Forums Home Forums BatchPatch Support Forum Local or Remote Commands to Wait,Terminate or Proceed with Job Queue / Multi-Row

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8911
    duffkess
    Participant

    Hi, I am currently evaluating a Batchpatch Project.

    I am wondering if I could create a local command which checks something (in my case the monitoring status of a specific host) with a script.

    In the script then I can decide based on the monitoring status to return either exitcode 0, 1 or anything else. Is it possible to use this output for the Job Queue and the Multi-Row Sequence?

    So like :

    local check returns 1 > wait 1 minuten and try again

    local check returns 0 > is ok, proceed

    local check returns 2 > cant find server, abort or terminate

    Is this somehow possible?

    thanks!

    #10320
    doug
    Moderator

    Yes, you can do this in BatchPatch. Your job queue would look something like this:

    Step 1: Run the local command, which executes your script. The script must have a built-in function to wait 1 minute and loop and try again if the result is 1.

    Step 2: Use one of the following special job queue items, depending on your needs. Failure/error is any non-0 return value from your script. If your script returns 0 then step 3 will execute. If the script returns a non-0 value then step 2 will terminate according to which item below you have used in the job queue:

    *Terminate queue if previous actions fails/errors (terminates just the job queue for just the executing row in the grid. The rest of the multi-row sequence will continue.)

    *Abort basic multi-row sequence if previous action fails/errors (terminates the entire basic multi-row sequence)

    *Abort advanced multi-row sequence if previous action fails/errors (terminates the entire advanced multi-row sequence)


    I hope this helps.

    -Doug

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.