Skip to content

Instantly share code, notes, and snippets.

@dshipp
Created June 16, 2014 13:20
Show Gist options
  • Select an option

  • Save dshipp/1f7fea63ad3a4f569855 to your computer and use it in GitHub Desktop.

Select an option

Save dshipp/1f7fea63ad3a4f569855 to your computer and use it in GitHub Desktop.
Remotely executing commands on Windows XP can be achieved through Cygwin and OpenSSH. However, some commands will not work correctly if executed like this, for example running Selenium requires correct access to the Desktop that Cygwin doesn't seem to achieve. This can be worked around by setting up a Windows Schedule Task to execute the command…
# To run the restart-all Windows Scheduled Task from the command line (either cmd or Cygwin):
(windows box)$ schtasks /run /tn restart-all
To run that command remotely from a linux box:
(linux box)$ ssh windows-user@windows-machine "schtasks /run /tn restart-all"
# Ensure that you have setup public key authentication on the windows box, to allow this command to work without password entry
# Jenkins can be scheduled to execute the above command to allow Windows Selenium instances to be restarted between builds (so as not to clash with running builds).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment