- Using Robots in Oracle Integration 3
- Build a Robot
- Complete Prerequisites
- Start the Robot Agent Automatically
Pre-General Availability: 2024-09-02
Start the Robot Agent Automatically
If you want the robot agent to automatically start and stop with the Windows operating system, configure the robot agent as a Windows service. This task is optional and applies only if the robot agent runs on a computer or virtual machine with a Windows operating system.
Caution:
If you don't configure the robot agent as a Windows service, you must manually start the robot agent every time the VM restarts.You use an open-source application called NSSM to configure the robot agent as a Windows service.
- Download NSSM to the computer.
- Download NSSM from the NSSM
website.
Download the file to the computer that hosts the robot agent, or to a location that you can access from that computer.
- Unzip the NSSM file.
- Place the NSSM files in a location of your choice on the computer.
- Download NSSM from the NSSM
website.
- Locate the nssm.exe file in the NSSM files, and copy the path to its location.
- If the robot agent isn't already running, start the robot agent.
- Add the path for the NSSM service to your Windows environment variables.
- Open the Settings dialog in Windows.
For example, open the Windows menu, and type settings.
- Next to Related links, select
Advanced system settings.
The System Properties dialog opens.
- Select Environment Variables.The Environment Variables dialog opens.
- In the User variables list, select the
Path
variable, and select Edit.The Edit environment variable dialog opens.
- Click New.
A new row becomes editable in the Edit environment variable dialog.
- Paste the path that you copied in a previous step into the row.
The path shouldn't include
nssm.exe
file name. - Click OK, and then click OK again.
- Open the Settings dialog in Windows.
- Update the
- Open a command prompt as an administrator.
- Enter the following command:
nssm install
The NSSM service installer dialog box appears. - Fill in the fields.
Tab Fields to enter Application
-
Path: Enter the directory of the java.exe file, including the
java.exe
file name. -
Startup directory: Enter the directory of the robot agent.
-
Arguments: Enter the command that starts the robot agent, without java at the beginning. If you're not sure, see Start the Robot Agent.
-
Service name: Enter the name of the service as you want it to appear in the list of Windows services. Do not include spaces in the name.
Details
-
Display name: Enter the display name for the service.
-
Description: Enter a description for the service.
-
Startup type: Select Automatic.
I/O
-
Output (stdout): Select the location for the output files for the service, including the name of the output file.
-
Error (stderr): Select the location for the error files for the service, including the name of the error file.
File rotation
-
Select only Rotate files.
-
For Restrict rotation to files bigger than __ bytes, enter 10240 or an appropriate value for your organization.
Environment
Environment variables: Enter the location of the Java home, such as:
JAVA_HOME="C:\Program Files\Java\jdk-17"
PATH=%JAVA_HOME%\bin;%PATH%
-
- Click Install service.
In the command prompt, a message informs you that the service was installed successfully.
- Start the service.
- Open the Services dialog in Windows.For example, open the Windows menu, and type settings.
- Find the service you just created. Its name is the Display name that you specified.
- Start the service.
- Open the Services dialog in Windows.
- To verify that the service started as expected, check the output and error files for any errors.
- Repeat the previous steps as needed for other Windows computers or virtual machines for which the robot agent must start automatically.