Executing jobs in the Multi-Row queue for host 2 and 3 depend on Host1

BatchPatch Forums Home Forums BatchPatch Support Forum Executing jobs in the Multi-Row queue for host 2 and 3 depend on Host1

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8874
    Marcel
    Participant

    Hello

    I’m facing the following scenario:

    I want to build a scheduled Basic Multi-Row queue Sequence with for example 3 hosts.

    Host1 is configured to download and install updates plus multiple reboots.

    Host2 is configured to deploy Firefox.

    Host3 is configured to run a custom script.

    Executing the jobs defined in the Multi-Row queue for host 2 and 3 depend on a positive outcome of the jobs for Host1

    Host1:

    1. check if there is enough disc space (for example 5GB), if there isn’t enough disk space, stop executing the total Multi-Row Sequence.

    2. Stop a specific service, for example a oracle service, if this job doesn’t succeed, stop executing the total Multi-Row Sequence.

    3. set the service to manual, stop executing the total Multi-Row Sequence if this doesn’t succeed.

    4. Install Windows updates

    5. Start the oracle service and set it back to automatic, if this job doesn’t succeed, stop executing the total Multi-Row Sequence.

    Only execute the jobs from the multi-Row sequence for Host 2 and 3 when the jobs for Host1 are completely successful.

    Host2:

    check if there is enough disc space (for example 9GB), if there isn’t enough disk space, don’t execute the job for deploying Firefox and proceed the job for Host 3 running the custom script.

    My questions are:

    1. How can I configure the check for a specified amount of disc space as mentioned in the scenario above (5GB and 9GB) for batchpatch to check and only to proceed when the outcom is true.

    2. How do I know for sure that the services are stopped?

    3. Can it be done to stop a running multi-Row sequence as described above?

    Thank you in advance.

    #10219
    doug
    Moderator

    Hi Marcel –

    0. You cannot schedule a basic multi-row queue sequence. You can only execute the basic sequence on-demand. However, you can schedule an advanced multi-row queue sequence, so that is probably what you would want to use in this case.

    1. If you want to check for available disk space and then terminate the entire multi-row queue sequence if a threshold is not met, you would need some custom scripting. You would need to write a custom script that checks for disk space and then returns 0 if it meets your threshold or return any non-0 integer if it does not meet your threshold.

    Here is an example of integrating this custom script into BatchPatch:

    Install Windows Updates Only If Sufficient Space Is Detected On Target C: Drive

    Note, in your job queue you would use something like:

    Step 1: Your GetDiskSpace custom script deployment (this script can be created following the guidelines in the link above)

    Step 2: Abort advanced multi-row sequence if previous action fails/errors

    Step 3: Terminate queue if previous action fails/errors

    Step 4: Your custom StopService script deployment (this script can be created following the guidelines in the link below)

    Step 5: Abort advanced multi-row sequence if previous action fails/errors

    Step 6: Terminate queue if previous action fails/errors

    Step 7: Your custom ChangeServiceStartupType script deployment (this script can be created following the guidelines in the link below)

    Step 8: Abort advanced multi-row sequence if previous action fails/errors

    Step 9: Terminate queue if previous action fails/errors

    Step 10: Install Windows Updates

    Step 11: Your custom StartService script deployment (this script can be created following the guidelines in the link below)

    Step 12: Abort advanced multi-row sequence if previous action fails/errors

    Step 13: Terminate queue if previous action fails/errors

    Step 14: Your custom ChangeServiceStartupType script deployment (this script can be created following the guidelines in the link below)

    Step 15: Abort advanced multi-row sequence if previous action fails/errors

    Step 16: Terminate queue if previous action fails/errors

    2. To start or stop a service inside of a queue in BatchPatch you can follow the same guidelines as mentioned above to create a custom script. We will have a tutorial for this posted in a few days at this link: BatchPatch Custom Script Integration – Install Windows Updates Only After Stopping a Specified Service

    3. Same idea as 1 and 2. The above linked tutorial will also show how to set a service to manual/automatic in a custom script.

    4. Install Windows Updates

    5. Same idea as 1, 2, and 3.

    -Doug

    #10215
    Marcel
    Participant

    Hello Doug,

    Thank you for your reply.

    I indeed wanted to schedule a advanced multi-row queue sequence.

    Regarding scripting, no problem, I just wanted to know if it is possible to let batchpatch react on an error from, for example a vbscript. You made this clear with a simple example, thank you.

    I’m looking forward to the tutorial you mentioned, which will also show how to set a service to manual/automatic in a custom script.

    – Marcel

    #10216
    doug
    Moderator

    It has been posted. Again please note that you will be using the following two special items in your job queue, in the order specified below. The tutorial does not mention the multi-queue sequence, which is why I highlight it here.

    *Abort advanced multi-row sequence if previous action fails/errors

    *Terminate queue if previous action fails/errors

    Thanks,

    Doug

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