Command Line Arguments and Multiple Instances of STK Scheduler

When running multiple instances of STK Scheduler, they can be configured through command line arguments.

Opening STK Scheduler

To open STK Scheduler through a command window:

  • Open a new command window

  • Navigate to the STK Scheduler bin folder (Typically C:\Program Files\AGI\STK 12\STKScheduler\bin)

  • Run the command: start STKScheduler.exe

    • An instance of STK Scheduler will open with no schedule or scenario loaded

  • To open a second instance rerun the command with the first instance of STK Scheduler still open

Configuration

When working with a single instance of STK Scheduler, the recommend method of configuring the TCP, STK, and REST ports is via the File -> Configuration... menu. However, when using multiple instances of STK Scheduler, in order to ensure each instance has a unique port, it is recommended to set the port via command line at startup.

  • TCP: start STKScheduler.exe -p 1234
    • This will start the instance of Scheduler with the TCP port set to 1234 (this number is user-configurable)
    • This setting can be confirmed by selecting File -> Configuration... -> Connect and looking at the Scheduler Server Port data field.

    This TCP port is for API commands and is only used when STK Scheduler is enabled to use a TCP connection. This setting can be verified be selecting File -> Configuration... -> Connect and checking the Enable TCP/IP Socket checkbox to determine if it is enabled or not

  • STK: start STKScheduler.exe -s 5555
    • This will start the instance of Scheduler with the STK port set to 5555 (this number is user-configurable however STK requires a value of at least 5001)

    • This setting can be confirmed by selecting File -> Configuration... -> STK and looking at the STK Port data field.

  • STK: start STKScheduler.exe -u "http://*:5000"
    • This will start the instance of Scheduler with the REST URL set to http://*:5000 (this is a semicolon separated list of urls, and is user-configurable)

    • This setting can be confirmed by selecting File -> Configuration... -> REST and looking at the REST URL data field.

  • The STK port is only used for TCP connections to STK. If STK Scheduler is set to use a COM connection this port is unused.

  • STK: start STKScheduler.exe -g
    • This will start the instance of Scheduler without graphics and hide the GUI

These commands can be run at the same time to set both ports (Ex: start STKScheduler.exe -p 1234 -s 5555)