- In the 'visitpack' directory, create a new batch file:
visitserver.bat that contains just one line:
.\jre\bin\java -cp .\ ViewServer 1631 >server.txt 2>&1
This will put the text output (log) of the server into the named file
("server.txt"). If you want to see it in the window instead, simply omit the clause:
>server.txt 2>&1
- From the "start" button: Start -> Settings -> Control Panel -> Scheduled Tasks
- Click on "Add Scheduled Task" and the Wizard comes up. If the Wizard does
not appear (likely because you've done this before), just right-click on the
task, and then select Properties. (The following seven steps apply to the Wizard,
but in the Properties dialog, you will be typing and choosing).
- Click "Next > and you will be presented with a list of tasks
- Click 'Browse' and find your 'visitserver.bat' file and pick it.
- In the next window, type a name for your task, and then select
"Daily"
NOTE: You may, alternatively, pick "When Idle". This setting will start the server
regardless of who is logged on, but does require that the machine be idle for the
specified amount of time (use 1 minute). "Idle" means no keyboard or mouse input.
- Click "Next >
- Type in the user name and password info for your account
If you are using the Wizard, the next windows should say "You have successfully scheduled...."
- Check the box "Open advanced properties for this task when I click
Finish"
- Click "Finish"
- In the "Properties" dialog for this task, click the "Schedule" tab
- Click on "Advanced"
- In the Advanced Schedule Options, check the "Repeat task" box and
put in '2' for the "Every..." option (see note above about using the 'when idle'
option -- if you picked this, then click the "idle time" checkbox, and then
choose one minute).
- Change the "Duration" to a very large value (I use 9000 hours). Be
sure the "If task is still running..." box is UN-checked!
- Click OK
- Back in the Properties window, select the "Settings" tab
- Un-check the "Stop the task if it runs for..."
(and anything else you want to)
- Click OK
When it runs the first time (in a couple of minutes) the DOS window will
pop-up. Just minimize it. If you want to be able to see the Server
status/log output in this windows, change the visitserver.bat file to