Running Astro Scheduler Engine as a Service

Overview

Astro Scheduler Engine can run as a GUI-less service and operated through a TCP/IP connection using Astro Scheduler Engine connect commands.

The standard GUI-version of Astro Scheduler Engine cannot run while the Astro Scheduler Engine service is running.

Caveats with running as a service:

  • No GUI
  • COM interface does not work (need to use TCP/IP) - should verify enabled in config file

Due to the Astro Scheduler Engine Service being Windows user agnostic, the event log and config files are by default in a different location than the location that may have been specified by the user during Astro Scheduler Engine installation. This default location is C:\ProgramData\AstroSchedulerEngine\. The file directory locations can be changed by updating the config file located in C:\ProgramData\AstroSchedulerEngine\config.

Installation of Astro Scheduler Engine Service

Confirm that the Astro Scheduler Engine service is not already installed by performing the following:

  1. Click Window's Start
  2. Click Control Panel
  3. Click System and Security
  4. Click Administrative Tools
  5. Click Services
  6. Confirm that AstroSchedulerWinService is not in the list

To Install the Service:

  1. Navigate to Astro Scheduler Engine bin directory (default is C:\Program Files\AGI\STK_ODTK 13\Scheduler\bin)
  2. As Administrator, run the file "AstroSchedulerWinServiceReg.bat"
  3. If the script fails, look inside those bat files to check actual OS commands
  4. Refresh the Services Window
  5. Verify that Astro Scheduler EngineWinService is now in the list
  6. Start the service by right-clicking on AstroSchedulerWinService in the Services Window and select "Start"

For any schedules that require a connection to STK, you will need to run the Astro Scheduler Engine service as a specific user.

To run the service as a specific user:

  1. Click Window's Start
  2. Open the Services application
  3. Locate AstroSchedulerWinService and right-click on it
  4. Select Properties
  5. In the Log On tab, select the radio button next to "This account" and enter the account information for the desired user
  6. Click OK

Examples

Example/simple test:

  1. Run SchedTCPClient.exe (default location at C:\Program Files\AGI\STK_ODTK 13\Scheduler\Examples\LegacyTCP\SchedTCPClient\SchedTCPClient\bin\Release)
  2. In the command window, type IP address of machine (use ipconfig /all in command window to find out ip address)
  3. Type the following commands as they appear below:
    • Sched / newschedule 'C:\AstroScheduler\test.ssc'
    • Sched / newtask 'a'
    • Sched / gettaskinfo 'a' ''
  4. Verify console displays taskinfo for task a
  5. Type quit

Un-Install of Astro Scheduler Engine Service

To un-install the service:

  1. Click Window's Start
  2. Click Control Panel
  3. Click System and Security
  4. Click Administrative Tools
  5. Click Services
  6. Right click on AstroSchedulerWinService in the list
  7. Click Stop
  8. Navigate to Astro Scheduler Engine bin directory (default is C:\Program Files\AGI\STK_ODTK 13\Scheduler\bin)
  9. As Administrator, run the file "AstroSchedulerWinServiceUnReg.bat"
  10. Refresh the Service Window
  11. Verify that AstroSchedulerWinService is no longer in list

After uninstalling the service, the regular Astro Scheduler Engine may need to be re-registered by running AstroSchedulerReg.bat.