Skip to main content

Runner guide

Audience: runner owners (the people who look after the computers that run agents) and administrators who roll runners out. Business users with an attended runner on their own PC will find the sections on attended work useful.

You need: on the runner computer, rights to install programs (administrator rights for a Windows service or an all-users install). In One CommandCenter, devices.manage to register, change and remove runners (administrators), and pools.manage for runner pools.

Contents​

  1. What a runner is
  2. Choose the kind of runner
  3. Register a runner
  4. Start it at sign-in or as a service
  5. Proxies and certificates
  6. The runner in One CommandCenter
  7. The screen: locked screens and after-run actions
  8. Default users and the default runner of a person
  9. Runner pools
  10. Temporary runners
  11. Updates, toolkits and secrets
  1. Diagnosing problems: ooa agent diagnose
  2. Moving a runner to a new One CommandCenter address
  3. Removing a runner
  4. Related guides

1. What a runner is​

OneRunner is the program that runs agents. It registers once with One CommandCenter, then:

  • sends a heartbeat every few seconds (a runner is online when it checked in during the last minute);
  • keeps one request open so that queued work, and stop or pause requests, reach it at once;
  • runs each agent in its own process, so a crashing agent never stops the runner;
  • reports every step, log line and variable back to One CommandCenter;
  • watches its own machine for runner triggers (files, windows, processes, services, hotkeys) every two seconds, and, on Windows with a signed-in desktop, listens for key-press and click triggers through input hooks (typed text is never recorded).

Its workspace is C:\Users\<you>\OOA Agent Workspace; log files are in its logs folder (one file per run, named by run id). Its registration is saved in ~/.ooa-agent/agent.json by default.

The computer that runs ooa server (or START-OOA.cmd) already has a runner that registered itself. This guide is for every other computer.

2. Choose the kind of runner​

QuestionChoose
Do agents use the screen (keyboard, mouse, windows, images, desktop dialogs, visible browsers)?A signed-in runner that starts at Windows sign-in
Do agents only work with files, data, web services, e-mail, databases?A service runner (Windows service, no desktop) is enough and survives sign-outs
Is a person at the machine during runs?Attended work: they start runs by hand on their own default runner and answer dialogs
Does nobody watch the machine?Unattended work: scheduled, triggered, API and queue runs. Needs an Unattended Runner seat
Is it a pooled virtual desktop or a short-lived build machine?A temporary runner (section 10)

Attended and unattended are about who sits at the machine and how runs are started; signed-in and service are about how the runner process itself runs. An unattended runner that uses the screen is a signed-in runner with a dedicated account that stays unlocked.

Seats: a runner needs an Unattended Runner seat to take One CommandCenter work (manual, scheduled, triggered, API, queue). A person with an Attended Runner seat (or a Developer or Citizen Developer seat) may run agents by hand on their own default runner. Administrators assign seats on Manage > Licenses.

3. Register a runner​

The quick way: download a ready runner installer​

One CommandCenter can give a ready installer: a ZIP of the product with its own Java and an Install.cmd that already holds this One CommandCenter's address and a one-time key.

  • For your own computer: My devices > Connect to my computer > Download the runner installer (permission Connect own computer as a runner). The key works once, for one hour; the runner becomes your local runner.
  • For a runner machine: Runner Machines > Register a runner > Create key > Download the runner installer (administrators). The key works once, for 24 hours.

Unzip it on the runner machine and double-click Install.cmd: it installs the runner for the signed-in Windows user (no administrator rights needed) and registers it. From an administrator's prompt, Install.cmd -AllUsers -Service installs it for everyone as a service.

The download is there when the server has a setup package to make it from: the newest ooa-setup-<version>.zip in the data folder's downloads folder (put one there on Linux, container and SaaS servers), or the server's own folder when it was installed from the setup package on Windows. Otherwise the dialog says so and shows the commands below.

Step 1: make a registration key (administrator)​

  1. In One CommandCenter open Run > Runner Machines and press Register a runner.

  2. Tick Temporary runner (VDI or pooled desktop) only for runners that come and go (section 10).

  3. Press Create key. The dialog shows the key and three ready-made commands. The key works once, expires in 24 hours and is shown only now:

    SituationCommand shown
    ONEOFFICEAUTOMATION already installedbin\ooa.bat agent register --url <address> --key ooareg_..., then bin\ooa.bat agent install-task
    With the MSI (runs as a Windows service)msiexec /i ooa.msi /qn ROLE=Runner URL=<address> REGISTRATION_KEY=ooareg_...
    With the setup packageInstall.cmd -Silent -Role Runner -Url <address> -RegistrationKey ooareg_...

Step 2a: install and register with the setup package (desktop runners)​

Run this as the Windows user the runner should work as (not as an administrator account, unless that is the account):

  1. Unzip ooa-setup-<version>.zip and double-click Install.cmd, or run it silently:

    Install.cmd -Silent -Role Runner -Url https://ooa.example.com:8720 -RegistrationKey ooareg_... [-CaFile ooa.cer] [-RunnerName FIN-RPA-01] [-Proxy system|none|URL]
  2. Setup installs the product with its own Java, registers the runner and sets it to start when this user signs in.

  3. Add -Service (as administrator) to make it a service runner instead.

Exit codes: 0 installed, 1 a parameter is missing or wrong, 2 the install failed, 3 administrator rights needed, 4 the prerequisite check failed. The log is %TEMP%\ooa-install.log.

Step 2b: install with the MSI (service runners, mass roll-out)​

msiexec /i ooa-<version>.msi /qn ROLE=Runner URL=https://ooa.example.com:8720 REGISTRATION_KEY=ooareg_...

Other properties: DATA_DIR, RUNNER_NAME, CA_FILE. A runner installed by the MSI runs as a Windows service, for agents that need no screen. For desktop runners use Install.cmd as the user. msiexec /x ooa-<version>.msi /qn removes it; data folders are kept.

Step 2c: register an existing install by hand​

From the install's bin folder:

ooa agent register --url https://ooa.example.com:8720 --key ooareg_... [--name FIN-RPA-01] [--ca ooa.cer]
ooa agent start

From a source checkout use .\gradlew.bat :cli:run --args="agent register --url ... --key ...". The runner's name defaults to the computer's name.

What you see​

In Run > Runner Machines the new runner appears with a green dot and online within seconds.

4. Start it at sign-in or as a service​

KindHowNotes
Signed-in runnerooa agent install-taskStarts the runner when this user signs in to Windows and restarts it if it stops. ooa agent uninstall-task removes it. Required for agents that use the screen
Service runnerooa service install --mode agent (administrator prompt)Starts with Windows and restarts after a failure (three times, a minute apart). Name "OOA Runner" unless --name; --account DOMAIN\user --password-env VAR to run as an account instead of Local System
By handooa agent startRuns until you press Ctrl+C. Useful for testing

Automatic sign-in after a restart. An unattended runner whose agents use the screen needs a signed-in Windows desktop. ooa agent autologon makes Windows sign the runner's user in by itself after each restart. Run it on the runner from a Command Prompt or PowerShell opened as administrator, with the password in an environment variable so it is never typed on the command line:

set OOA_RUNNER_PW=...
ooa agent autologon --user CORP\robot1 --password-env OOA_RUNNER_PW
set OOA_RUNNER_PW=

The password is kept as Windows' protected LSA secret, as Microsoft's Autologon tool keeps it, never as plain text in the registry, and it never goes to One CommandCenter. --status shows whether automatic sign-in is on and for whom (never the password), and warns when an old plain-text password is in the registry. --off turns it off and removes the password. Together with ooa agent install-task and Lock the screen after unattended runs (Runners > Update runners), the runner comes back signed in and taking work after every restart, and its screen is locked between runs. Automatic sign-in does not unlock a screen that is already locked: restart the machine, or sign in on its console. Use a dedicated runner account, and keep the machine physically and remotely protected, since it signs in by itself.

Several unattended sessions on one Windows Server. One runner does one run at a time. To run several screen agents at once on a Windows Server with Remote Desktop Services, give each robot a Windows account of its own:

  1. Sign in once as each robot account. Register a runner for it with its own registration file (ooa agent register --url ... --key ... --name SERVER-robot1 --config C:\OOA\robot1\agent.json) and run ooa agent install-task --config C:\OOA\robot1\agent.json, so that account's runner starts when it signs in.
  2. As an administrator on the server, put each password in an environment variable named after the account (OOA_SESSION_PW_ROBOT1, OOA_SESSION_PW_ROBOT2, ...), then run ooa agent sessions --users robot1,robot2 --watch.

ooa agent sessions opens a Remote Desktop session from the server to itself for each account that has none. Each session goes to its own loopback address (127.0.0.2, 127.0.0.3, ...), so Windows keeps a saved credential for each, in the administrator's Credential Manager. --watch checks every minute and opens a session again when one is gone (disconnected sessions count as gone). --check only shows which accounts are signed in. --width and --height set the screen size of each session. The command passes each password to Windows' cmdkey once, as a program argument, which other administrators on the server could see in the process list at that moment: run it on a server only administrators use, and clear the variables afterwards. Each session needs a Remote Desktop licence; a Windows client edition allows only one session. In One CommandCenter, put the runners in one pool so work spreads across them.

Manage a service with ooa service start|stop|status|uninstall --mode agent or in Windows Services. Its log is <data>\logs\service-agent.log.

5. Proxies and certificates​

Proxies. By default the runner uses the Windows proxy settings (including automatic configuration scripts). Choose otherwise at registration, or later with ooa agent network:

ooa agent network --proxy none
ooa agent network --proxy http://proxy.corp:8080 --proxy-user svc-rpa --proxy-password-env PROXY_PW
ooa agent network (no option: show the current proxy and trusted certificate)

The proxy password is read from the environment variable. On Windows it is stored encrypted with DPAPI; on Linux and macOS it is stored in the file proxy-password next to the runner's settings, readable only by the account that owns it. Proxies that only accept Windows (NTLM) sign-in are not supported. Restart the runner after a change.

Certificates. One CommandCenter certificate from a company authority that Windows and Java already trust needs nothing. For a self-signed certificate, get ooa.cer from the administrator (ooa tls export-cert --out ooa.cer) and add --ca ooa.cer when registering (or ooa agent network --ca ooa.cer). The runner keeps a copy beside its settings and trusts it from then on. Runners on Windows also trust the Windows certificate store, so a company authority rolled out by Group Policy needs nothing more.

6. The runner in One CommandCenter​

Runner guide
Runners as One CommandCenter shows them.

Run > Runner Machines lists every runner. Columns: Runner (name, host name, operating system), Status, Running, Agent (the runner's version), Type, Default users, Log level, Screen, After a run, Program, Last seen, Registered and Disable/Enable. The page refreshes every 15 seconds.

Click a runner for its details: host name, operating system, agent version, last seen, type, default runner of, log level, screen, after unattended runs, Toolkits (the list it reported), registered by, runner id, Now and History. Buttons: Run an agent here, Rename, Disable/Enable, Remove.

If Agent shows a red "update One CommandCenter" pill, the runner is newer than One CommandCenter and gets no work until One CommandCenter is updated.

Change settings for several runners at once​

Press Update runners, tick runners, then choose (or leave (keep)):

FieldChoicesEffect
Log levelerror, warning, info, debugThe level of the runner's own log; picked up at the next heartbeat
Runner typeSingle-user, Multi-userSingle-user: the default runner of one person. Multi-user: of several people. Runners nobody set are multi-user
After unattended runsLeave the screen as it is, Lock the screen, Sign outSection 7

Press Update checked runners. No one has to visit the machines.

7. The screen: locked screens and after-run actions​

Each runner reports its screen with every heartbeat:

ScreenMeaning
UnlockedSomeone is signed in and the screen is usable
LockedAgents that use the screen cannot run until someone signs in
No desktopThe runner is a Windows service: only agents that need no screen can run

A run of an agent that uses the screen does not start on a locked runner or one without a desktop: it fails at once with RUN.NO_DESKTOP and the reason, instead of failing halfway. Headless runs and agents that need no screen run anywhere. Signing a user in on a locked or signed-out runner by itself is not built yet: keep unattended screen runners signed in and unlocked, for example with a dedicated account and the screen saver lock off.

After unattended runs the runner can Lock the screen or Sign out, so nobody walks up to a signed-in machine. It only acts when the screen was unlocked and the run was unattended. Remember that after Sign out the runner (started at sign-in) stops until someone signs in again, and after Lock the screen the next screen agent cannot start until the machine is unlocked: use these on machines where that is what you want.

Default users and the default runner of a person​

Each person can have a default runner, chosen by an administrator in Manage > Users > Default runner. It is used when:

  • someone runs an agent for Run-as users: each person's run goes to their default runner, as them;
  • a schedule or trigger runs as a person with Use the run-as user's default runner;
  • an Attended Runner seat holder runs agents by hand.

The Default users column on the Runners page shows whose default runner each runner is. Set a personal PC to Single-user and a shared machine to Multi-user (Update runners).

9. Runner pools​

Run > Runner Machines > Runner pools groups runners. A run, schedule, work queue, test run or API task sent to a pool goes to its least busy online runner.

  1. Press New runner pool (needs pools.manage).
  2. Give a Name (for example Finance runners) and Description, tick the Runners in the pool, and Save.
  3. Edit changes the runners; Delete removes the pool (not the runners).

The list shows each pool's runners with a status dot and Online "n of m". Put runners with the same applications and toolkits in one pool, so any of them can take any run.

9.1 Auto-scaling pools​

One CommandCenter can make a pool's machines follow its work in your own cloud. On a pool's row menu, choose Auto-scaling (needs devices.manage) and tick Scale this pool by its work:

SettingMeaning
Fewest machines, Most machinesThe range (0 to 500). With 0 the pool may have no machines when there is no work
Runs per machineHow many waiting and running runs one machine takes
Minutes between changesHow long after a change before the size changes again
Where the size goesA webhook (any cloud or tool): a POST of {"pool", "desired", "at"}, signed with HMAC-SHA256 in X-OOA-Signature: sha256=... when a signing secret is set. AWS Auto Scaling group: its desired capacity is set, with an access key kept in the vault. Azure virtual machine scale set: its capacity is set, signed in as an app (client secret in the vault)

Every minute, One CommandCenter counts the pool's waiting and running runs, plus the runs refused in the last ten minutes because no runner of the pool was online, so an empty pool still grows when work arrives. It divides by Runs per machine, keeps the result within the range, and sends it when it changed. Each change is recorded in Audit Trail as pool.scale, including failures. The dialog shows the figures and the size it would ask for now.

Machines that start must register as runners of the pool by themselves: make a Temporary runner key and use it in their start-up script (ooa agent register --url ... --key ... --keep-existing, then ooa agent install-task), and add them to the pool. Removed machines go offline, and temporary runners are cleaned up (section 10). A webhook may be plain http only to this computer (a scaling script beside One CommandCenter); otherwise it is https.

10. Temporary runners​

For pooled virtual desktops or short-lived machines, tick Temporary runner when making the registration key. The runner shows a Temporary pill. It is removed by itself once it has been offline for the hours set in Settings > Remove temporary runners after this many hours without contact (8 by default), and its licence seat is freed.

11. Updates, toolkits and secrets​

Program updates. The Program column says Up to date or Update available. Update on a runner (or Settings > Update runners automatically to this One CommandCenter's version when they are idle) makes an idle runner download the files it needs, check every checksum, swap its program folder and start again: a service is restarted by Windows, a signed-in runner by its task. The bundled Java is not updated this way. A runner installed for all users but started at a user's sign-in may not be allowed to write to Program Files: update it with the MSI instead.

Toolkits. Each runner reports its toolkits (shown in its details). A run that needs a toolkit or version the runner lacks fails at once with RUN.TOOLKIT_MISSING, naming what is missing. Custom toolkits travel with the run; the runner checks each jar's checksum and signature (RUN.TOOLKIT_LOAD if either fails).

Runner secrets. Each runner's secret is replaced by itself every 30 days (Settings > Give runners a new secret every (days), 0 = never). The runner saves the new secret safely; the old one keeps working for a short while.

Environment locks: one run at a time on a shared system​

Some systems allow only one session at a time: one SAP login, one shared mailbox, one terminal user. When agents on several runners use such a system, give it an environment lock (as Blue Prism calls it): a name that only one run holds at a time.

In the agent. Use the Environment locks toolkit:

  • Acquire lock takes the lock by name (names are compared without case). Wait (seconds) waits for the run that holds it to give it back (0 tries once). The result acquired says whether this run has it; when it does not, held by names the run, runner and person holding it. Tick Fail when the lock is not acquired to stop with LOCK.TIMEOUT instead.
  • Release lock gives the lock back. A run can give back only its own locks: releasing a lock it does not hold changes nothing, returns released false and writes a warning to the log.
  • Check lock says whether the lock is held, by whom, since when and until when; the condition Lock is held asks the same in an If or a loop.

When locks are given back. A lock belongs to the run that took it. It is given back by Release lock, when the agent that took it ends, and in any case when the run ends: succeeded, failed, stopped, or failed because its runner stopped reporting. One CommandCenter also checks every 15 seconds for locks whose run is no longer running.

The lease. Each lock has a lease, an hour unless the step's Lease (seconds) says otherwise (5 seconds to 7 days). A lock held past its lease may be taken by another run, and the audit trail notes whose it was. A long job renews its lease by acquiring the lock again, which keeps the time it was first taken.

In One CommandCenter. Run > Environment locks lists the locks held now: the lock, the run, agent and person holding it, the runner, since when, and when the lease runs out (marked when it has passed). Everyone who can see runners sees the list. Administrators (permission Release environment locks) can Release a lock by hand, for example when a run is stuck; the run is not stopped, and the release is written to the audit trail.

Without One CommandCenter. In OneAgentStudio on its own, locks work on this computer only: they are kept in memory and shared by the runs in that program, with the same rules. Separate ooa run commands do not share them.

12. Diagnosing problems: ooa agent diagnose​

When a runner will not connect or will not take work, run on it:

bin\ooa.bat agent diagnose

Each line is PASS, WARN or FAIL with what to fix, and it ends with "No problems found." or the number of problems:

CheckA FAIL or WARN usually means
Runner settingsNot registered yet: ooa agent register
Name lookupOne CommandCenter's host name is unknown here: DNS or a typo in the address
ProxyWhich proxy is used
NetworkThe port does not answer: firewall, or One CommandCenter is stopped
CertificateNot trusted: register with --ca FILE, or install the company authority in Windows
One CommandCenterNo answer or an error; if a proxy asks for a sign-in, set it with ooa agent network
ClockMore than a minute apart: set both clocks from the same time server
Runner sign-inThe runner was deleted or disabled: register it again
ScreenLocked or no desktop: screen agents will not start
Free disk spaceLess than about 1 GB free
ToolkitsHow many toolkits are installed

For One CommandCenter computer itself use bin\ooa.bat check.

Other common problems​

SymptomWhat to do
Online, but runs stay queuedCheck it is enabled, has an Unattended Runner seat, and is not busy with a long run
Runs fail with RUN.NO_DESKTOPUnlock the screen, or move screen agents to a signed-in runner
Runs fail with RUN.NEEDS_PERSONAn unattended run hit a dialog; run it attended or add a timeout in the agent
The runner stops when you sign outExpected for a signed-in runner; use a service runner for screenless work
Need more detailSet Log level to debug (Update runners) and read the runner's log in its workspace logs folder

13. Moving a runner to a new One CommandCenter address​

When One CommandCenter moves to a new server or a new address with its data, keep each runner's registration:

ooa agent move --url https://new-address:8720 [--ca new.cer]

Then restart the runner. Runners that reach One CommandCenter through a DNS name you repoint need nothing. See Installation on Linux and in containers.

14. Removing a runner​

In the runner's details press Remove. It is allowed when nothing is queued or running on it and no schedule or trigger uses it. The runner is taken off pools and default runners and its seat is freed; register it again to use it. On the machine, remove the start task (ooa agent uninstall-task) or service (ooa service uninstall --mode agent), then uninstall the product in Apps and Features. Disable instead keeps the runner but gives it no work.