title: Running batch file remotely using Hudson
body: <p>What is the simplest way to schedule a batch file to run on a remote machine using Hudson (latest and greatest version)? I was exploring the master slave setup. I created a dumb slave but I am not sure what the parameters should be so that I can trigger the batch file in the remote slave machine.</p>
  
  <p>Basically, I am trying to run 2 different batch files on two different remote machines sequentially, triggered from my machine (the master). The Step by step guide on the Hudson website is a dead link. There are similar questions posted on SO but it does not quite work for me when I use the parameters they mention.
  If anyone has done something similar please suggest ways to make this work.
  (I know how to set up jobs, and add a step to run a batch file etc what I am having trouble configuring is doing this on a remote machine using hudson in built features)</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Thank you all for the suggestions. Quick update on this:
  What I wanted to get done is partially working, below are the steps followed to get to it -</p>
  
  <ol>
  <li><p>Created new Node from Manage Nodes -> New Node -> set # of Executors as 1, Remote FS root set as '/var/hudson', set Launch method as using JNLP, set slavename and saved.</p></li>
  <li><p>Once slave was set up (from master machine), I logged into the Slave physical machine, I downloaded the _slave.jar from <a href="http://masterserver:port/jnlpJars/slave.jar" rel="nofollow">http://masterserver:port/jnlpJars/slave.jar</a>,  and ran the following from command line at the download location -> java -jar _slave.jar -jnlpUrl <a href="http://masterserver:port/computer/slavename/slave-agent.jnlp" rel="nofollow">http://masterserver:port/computer/slavename/slave-agent.jnlp</a>. The connection was made successfully.</p></li>
  <li><p>Checked 'Restrict where this project can be run' in the Master job configuration, and set paramater as slavename. </p></li>
  <li><p>Checked "Add Build Step" for adding my batch job script</p></li>
  <li><p>What I am still missing now is a way to connect to 2 slaves from one job in sequence, is that possible?</p></li>
  </ol>