none
runbook run time dependency RRS feed

  • Question

  • I  am wondering how to work on the runbook dependency.

    We have quite a few runbooks that has run process activity that runs powershell script to finish some tasks.

    The powersehell script will handle all the processes in a category in the  individual  run book.

    But  we have some time dependences on some of the  runbooks.  That means  one or two runbook has to run after the some specific runbook run.   What is the best way to handle the run time dependency in runbooks?

    for example runbook 3 and runbook 2 has to run after runbook1.

    Or Runbook 3 runs after runbook 2 and runbook 2 runs after runbook1.

    There is no record return for each of them. Just one procedure has to run after the other.

    Thanks much


    SQLFriend

    Friday, August 2, 2019 4:50 PM

Answers

  • Hi,

    you can create one Runbook with 3 "Invoke Runbook" Activities. The first "Invoke Runbook" Activity triggers Runbook1 the second "Invoke Runbook" Activity triggers Runbook2 and the third … yes :-).

    Check "Wait for completion" in each "Invoke Runbook" Activity.

    Regards,

    Stefan


    More and news about System Center at stillcool.de and sc-orchestartor.eu .

    Friday, August 2, 2019 7:31 PM
    Answerer
  • You can invoke other Runbooks with the "Invoke Runbook Activity", like Stefan already mentioned

    So you need 1 "Master Runbook" and add 3x "Invoke Runbook Activity". Link the Activities in the order/dependenciy you like. Each Activity is configured to invoke one runbook. The option "Wait for completion" needs to be set to wait for the completion of the invoked runbook before the next runbook starts.

    The "Master Runbook will be started and takes care of the rest. This way you still have independent runbooks for each purpose/task. But on the other hand the order the runbooks are executed reflects the dependencies.

    Maybe this screenshot makes it a little easier to get the idea.

    Hope this helps.


    Andreas Baumgarten

    Friday, August 2, 2019 11:33 PM

All replies

  • Hi,

    you can create one Runbook with 3 "Invoke Runbook" Activities. The first "Invoke Runbook" Activity triggers Runbook1 the second "Invoke Runbook" Activity triggers Runbook2 and the third … yes :-).

    Check "Wait for completion" in each "Invoke Runbook" Activity.

    Regards,

    Stefan


    More and news about System Center at stillcool.de and sc-orchestartor.eu .

    Friday, August 2, 2019 7:31 PM
    Answerer
  • Thanks, in one of my cases, one runbook (let us called it Runbook1) runs first, then there are 2 separate run books that need to run after runbook1.

    I don't want runbook1 run multiple times. I understand I can put runbook1 and others in one runbook, but it is hard to give a name of the runbook, it actually combined 3 different purpose runbooks in one.

    I was hoping there is a way to just set one a dependcy time of the run book needs to run after the other, and but still keep each run book as a separate runbook.

    Thanks,


    SQLFriend

    Friday, August 2, 2019 8:51 PM
  • You can invoke other Runbooks with the "Invoke Runbook Activity", like Stefan already mentioned

    So you need 1 "Master Runbook" and add 3x "Invoke Runbook Activity". Link the Activities in the order/dependenciy you like. Each Activity is configured to invoke one runbook. The option "Wait for completion" needs to be set to wait for the completion of the invoked runbook before the next runbook starts.

    The "Master Runbook will be started and takes care of the rest. This way you still have independent runbooks for each purpose/task. But on the other hand the order the runbooks are executed reflects the dependencies.

    Maybe this screenshot makes it a little easier to get the idea.

    Hope this helps.


    Andreas Baumgarten

    Friday, August 2, 2019 11:33 PM