Agent restarts with a running job

I’ve run into a problem where I start a PowerShell script to run and “pause” until a particular file is updated (waithidden cmd.exe /C powershell.exe). The problem is that this could be hours and the agent will do its daily restart (Service manager stop request) while the powershell script is running, the job will end with “Action ended while waiting for another process to complete”. Do we have any way to suspend the daily restart, or pick the waiting PowerShell up after the agent restart?

The agent shouldn’t be restarting daily, as far as I know. Perhaps you have a scheduled task that is restarting the client?

1 Like

Jason, Thank you! yes indeed someone has created a schedule for this.

-Brian

Some environments implemented client restart schedules to handle clients that could get hung up waiting for a user input, such as erroneous fixlets that might be attempting to show a confirmation dialog (which is not visible when running a a service). Such actions would never complete, leaving the client unusable until you restart it or stop the Action.

These days, I would instead recommend using _BESClient_ActionManager_OverrideTimeoutSeconds and _BESClient_ActionManager_OverrideDisposition to set up a timeout value for each ‘wait’ command. These were added in version 9.5.11.

https://help.hcltechsw.com/bigfix/9.5/platform/Platform/Config/r_client_set.html

BES client helper? I still use it