Ability to not reboot prior a defined time and wait for operations

BatchPatch Forums Home Forums BatchPatch Support Forum Ability to not reboot prior a defined time and wait for operations

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9370
    booster
    Participant

    Hi,

    Let’s say I’m starting installing patches with a schedule early the morning but don’t want to reboot the servers prior a defined time. So far I can schedule a job queue+reboot but how may I be sure the installations tasks is not in progress at the time of the reboot?

    Something like “do not restart prior time X and if all operations are done” if it has more sense.

    #11629
    doug
    Moderator

    One option is to schedule the job queue like this:

    Download and install updates

    Wait X minutes

    Reboot (force, if required)

    If the job queue is scheduled for 5AM, but you don’t want the reboot to occur before 7AM, then you could do this:

    Download and install updates

    Wait 60 minutes

    Wait 60 minutes

    Reboot (force, if required)

    In the above case the reboot would occur some time after 7AM, depending on how long the ‘Download and install updates’ operation took.


    If your goal is to completely separate the scheduled tasks so that you have one scheduled task for the ‘Download and install updates’ plus a separate scheduled task for the ‘Reboot (force, if required)’ then you would either have to separate the tasks far enough apart in time that you can safely assume that the installation has completed when the reboot task starts, or otherwise if the tasks are scheduled close enough together that you can’t safely assume that they won’t overlap then you would have to use a custom script to make sure that the reboot does not occur while the ‘Download and install updates’ action is still running. The tutorial on this page shows how you could use a custom script to check for the existence of a process on the target computer. It will only proceed when the specified process is no longer running. In this case you could modify the script to look for batchpatchremoteagent.exe. If that process is not present, then the BatchPatch Windows update action is not running.

    #11630
    booster
    Participant

    Hi Doug and thank you for your answer. This is a solution indeed but I had to mention the reboot windows are determined. So for example ionly reboot during the lunchtime of between 08Pm and 10PM. If the updates were not installed to catch the 1st windows wait for the next one

    In such way the solution is not applicable but it’s a start 🙂

    #11631
    doug
    Moderator

    OK, no problem. For custom functionality like you are describing you can still use scripts similar to what I described in the above posting. You would just need to modify the scripts to do exactly what you need instead of using the script as-is without any modifications.

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