I have a jenkins instance installed on a oracle linux box, and I have attached a windows node to that using the method "Launch agent by connecting to the controller"
This windows is also a remote server which I access from Remote Desktop Connection Manager(RDC).
The issue is to connect the node to jenkins, every time I need to login to the windows server from RDC and execute the agent.jar file with a following like command
java -jar agent.jar -jnlpUrl http://serverIP:8000/jenkins/manage/computer/my-project/jenkins-agent.jnlp -secret @secret-file -workDir "H:\Jenkins_slave"
if I close the cmd window or close the RDC session, this node get disconnected from jenkins. How I can keep this node always connected even if my session on RDC expires/close the cmd window ??