Command Line Arguments and Multiple Instances of Astro Scheduler Engine

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

Opening Astro Scheduler Engine

To open Astro Scheduler Engine through a command window:

  • Open a new command window

  • Navigate to the Astro Scheduler Engine bin folder (Typically C:\Program Files\AGI\STK_ODTK 13\Scheduler\bin)

  • Run the command: start AstroScheduler.exe

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

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

Configuration

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

  • TCP: start AstroScheduler.exe -p 1234
    • This will start the instance of Astro Scheduler Engine 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 Astro Scheduler Engine Server Port data field.

    This TCP port is for API commands and is only used when Astro Scheduler Engine 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 AstroScheduler.exe -s 5555
    • This will start the instance of Astro Scheduler Engine 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 AstroScheduler.exe -u "http://*:5000"
    • This will start the instance of Astro Scheduler Engine 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 Astro Scheduler Engine is set to use a COM connection this port is unused.

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

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