...
Create a simple bat file to run extractor and save it in some directory that is easily accessible:
Code Block language bash cd /d <full_path_to_extractor_directory> python Landsat7mosaic.py
Download and install NSSM. At the time of writing this document, the latest stable version is 2.24.
Make sure that NSSM is added to your PATH for easy access from the command prompt.From Windows Command Prompt, run the command to install a new service. You will need to provde administrative privileges to execute this command:
Code Block language bash nssm install <service_name>
Here the <service_name> is the unique name of the service. This is different from the display name that shows up when you open the Windows Service Manager.
- Fill in the details of the extractor and the service settings in various tabs
- In the Application Path, put the path of the bat file that was created in step 1. Startup directory will be the directory containing the bat file by default. Provide any arguments if needed.
- Add the service details including the display name
- Set exit actions. Optionally, provide a delay to restart the service.
- Optionally, choose log files to write stdout and stderr
- If needed change any of the other settings and press "Install Service" button
Start the service from Windows Service Manager
Or you can use the "nssm start <service_name>" command. Other commands needed to manage the service are listed below:
For example,Code Block nssm.exe restart terex-floodplain
- Make sure that the corresponding extractor queue was created in RabbitMQ. Done!
- In the Application Path, put the path of the bat file that was created in step 1. Startup directory will be the directory containing the bat file by default. Provide any arguments if needed.
...