Custom script timeout

Forum / NoMachine Terminal Server Products / Custom script timeout

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46539
    MiaChien
    Participant

    Hi,

    I have configured UserScriptBeforeSessionStart in sever.cfg to execute my own script. However, I’ve found that the execution time cannot exceed 30 seconds, as it times out beyond that. How do I change the default value?

    #46634
    Britgirl
    Keymaster

    Hi, if the custom script terminates before the time-out and exits with a non-zero code, in that case NoMachine reports an error. If the script finishes with exit code 0 before timeout, then the session is started. If the timeout is reached and the script has still not finished, the script is killed and NoMachine reports an error. What is happening in your case? Can you provide some more details about your script and what you are trying to achieve? Do you need your script to have finished running before the start of the session? Or can it maybe run in the background whilst the session still starts?

    The time out for custom scripts is a value (30 secs) which is currently not configurable but we can evaluate the possibility to make it configurable. What would you like to achieve with your script that needs longer?

    #46648
    MiaChien
    Participant

    Hi Britgirl,

    I use the API in the custom script to verify secondary authentication of the user, so I need to wait for the user’s feedback.

    If ‘YES’, then the session is started. If ‘NO’, the session can’t be started.

    But when my script is waiting over 30 secs, the NoMachine reports an error and the script is killed.

    Can the time out for custom script setting be extended to 3 minutes?

    #47259
    Britgirl
    Keymaster

    Hi, we will be adding a timeout parameter to the scripts. This will allow you to set a timeout that fits your custom script setup.

    so for example, UserScriptAfterLogin "/usr/script/afterLogin.sh --timeout 180.

    This will be implemented for version 9.

Viewing 4 posts - 1 through 4 (of 4 total)

This topic was marked as solved, you can't post.