How to disable 5 minute timeout for PS scripts

I have a PS script in the deployment task, which, after executing the necessary commands, waits until 11:59 PM to restart the server. Unfortunately, since version 5.1.11, the timeout for scripts is set to 5 minutes. In previous versions the script worked without problems for me, but now it is terminated prematurely and in the log there is information Timeout waiting for powershell to complete (305s)

Please provide information on how this timeout can be disabled.

Thank you.

Hi, I’m afraid the approach you are using is not currently supported. You should use a deferred deployment task - this is where your Tasks are set to the ‘Deferred’ trigger and you then either run them manually or you run your own scheduled tasks to trigger them. In your case I would let the certificate renew whenever required, then schedule a task to run your deployment tasks weekly (apply the certificates and restart the server).

When a certificate is renewed the default behavior is to keep the old certificate in the local machine store so services bound to it keep working, you can then choose when to perform the actual deployment step (associating services with the new version of the certificate) as required.

Which service(s) are you applying the certificate to?

Thanks for the information. I’m uploading the certificate to RDS, but I don’t need to restart the RDS services until 23:59 at night. I’ve solved it in a different way. Deploying a PS script that deploys a new certificate runs a second PS script. This second PS script waits until 23:59 and then restarts the server. The first PS script terminates within the timeout independently of the second PS script and does not cause an error.

1 Like