Project

General

Profile

StartHere » History » Version 4

Luke Murphey, 11/15/2011 07:53 AM

1 1 Luke Murphey
h1. WakeAndRun Overview
2 1 Luke Murphey
3 2 Luke Murphey
WakeAndRun is a small application that provides a GUI for starting hosts and running an application once the host comes online. The app uses wake-on-LAN technology to start the remote host and uses to ping to determine when the host is up. Once the host is confirmed as running, the command that is defined by the user is executed.
4 1 Luke Murphey
5 2 Luke Murphey
This is useful for starting a host that is typically asleep but needs to be used remotely. WakeAndRun can start the server, make sure it is running and then start remote access software (like RDP or VNC).
6 2 Luke Murphey
7 4 Luke Murphey
You can download WakeAndRun from the "files list":/projects/wakeandrun/files.
8 4 Luke Murphey
9 1 Luke Murphey
h3. How to Use Wake And Run
10 2 Luke Murphey
11 2 Luke Murphey
You'll need to specify arguments in order to define what host you want to wake-up and what you want the app to do once the host comes online. Below are the arguments allowed:
12 2 Luke Murphey
13 2 Luke Murphey
* *--gui:* Starts the application graphical user interface
14 3 Luke Murphey
* *--wake:* Indicates that the server must be sent a wake-on-LAN (WOL) request before trying to run the command (example: _--wake "00:0D:87:39:91:A0"_)
15 3 Luke Murphey
* *--message:* The message to display (example: _--message "An remote desktop connection is being established"_)
16 3 Luke Murphey
* *--delay:* The delay (in number of seconds) to wait for the device comes on line before aborting
17 3 Luke Murphey
* *--ipaddress:* The IP address to ping in order to determine if the host has come online (example: _--ipaddress 10.0.1.1_)
18 3 Luke Murphey
* *--command:* The command to run once the host has come online (example: _--command "mstsc /v:10.0.6.76"_)
19 3 Luke Murphey
* *--title:* The title of the dialog to be shown in the GUI (example: _--title "Starting Server"_)
20 2 Luke Murphey
21 2 Luke Murphey
Below is an example that wakes up the host and start the RDP client (mstsc):
22 2 Luke Murphey
23 2 Luke Murphey
<pre>
24 3 Luke Murphey
java -jar wakeandrun.jar --gui --wake "00:0D:87:39:91:A0" --message "An remote desktop connection to backup server is being established" --delay 10 --ipaddress 10.0.1.1 --command "mstsc /v:10.0.1.1" --title "Starting Backup Server"
25 2 Luke Murphey
</pre>