Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.68k stars 511 forks source link

Consider adding timeout value to script execution #6076

Open nafai opened 1 month ago

nafai commented 1 month ago

As seen in #2202, presenting in the agent console message Run commands can't execute, already busy.

By running a script that pauses for any reason (waiting on stdin, waiting on an interactive window, etc), an agent can get "stuck" and not process any other scripts you try to send it. An agent will remain in this state until the service is restarted, running agentupdate, etc.

Please consider adding a timeout value for script execution in config.json. Even a long timeout (1800/3600 secs as a default value) would be preferable to an indefinite timeout.

Alternatives could include adding the timeout as another field in the Run Commands dialog, or to just launch multiple scripts in parallel and not care if they ever finish executing.