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:
- Click Window's Start
- Click Control Panel
- Click System and Security
- Click Administrative Tools
- Click Services
- Confirm that AstroSchedulerWinService is not in the list
To Install the Service:
- Navigate to Astro Scheduler Engine bin directory (default is C:\Program Files\AGI\STK_ODTK 13\Scheduler\bin)
- As Administrator, run the file "AstroSchedulerWinServiceReg.bat"
- If the script fails, look inside those bat files to check actual OS commands
- Refresh the Services Window
- Verify that Astro Scheduler EngineWinService is now in the list
- 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:
- Click Window's Start
- Open the Services application
- Locate AstroSchedulerWinService and right-click on it
- Select Properties
- In the Log On tab, select the radio button next to "This account" and enter the account information for the desired user
- Click OK
Examples
Example/simple test:
- Run SchedTCPClient.exe (default location at C:\Program Files\AGI\STK_ODTK 13\Scheduler\Examples\LegacyTCP\SchedTCPClient\SchedTCPClient\bin\Release)
- In the command window, type IP address of machine (use ipconfig /all in command window to find out ip address)
- Type the following commands as they appear below:
- Sched / newschedule 'C:\AstroScheduler\test.ssc'
- Sched / newtask 'a'
- Sched / gettaskinfo 'a' ''
- Verify console displays taskinfo for task a
- Type quit
Un-Install of Astro Scheduler Engine Service
To un-install the service:
- Click Window's Start
- Click Control Panel
- Click System and Security
- Click Administrative Tools
- Click Services
- Right click on AstroSchedulerWinService in the list
- Click Stop
- Navigate to Astro Scheduler Engine bin directory (default is C:\Program Files\AGI\STK_ODTK 13\Scheduler\bin)
- As Administrator, run the file "AstroSchedulerWinServiceUnReg.bat"
- Refresh the Service Window
- 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.