Run Process – starting a program on the application server¶
The command "Run Process" starts a program on the application server, optionally with arguments, and can wait until it has finished. This page is for administrators and operators who connect nexxcite with command-line tools on the server.
1. At a glance¶
| Purpose | Start a program or script on the server |
| Typical use | Convert a file with a command-line tool; start an existing batch job |
| Where in the editor | Toolbar menu "Communication" → "Run Process" |
| Needs a user interface | No |
| Related | Write To File, Iterate Files |
The program runs with the rights of the account the application server runs under. Treat the path and the arguments as security relevant: never build them from user input without checking it.
2. Settings¶
The settings are on the tab "Settings". "Display Name", "Description" and "Execution Condition" are on the tab "General" (see Actions).
| Setting | Meaning | Default / Required |
|---|---|---|
| "Executeable Path" | Expression for the program: a full path such as /opt/tools/convert or C:\Tools\convert.exe, or a bare program name that is searched in the PATH of the server |
Required |
| "Run In" | Expression for the working directory; relative paths in the arguments refer to it | Empty: the working directory of the application server |
| "Arguments" | Expression for the command line passed to the program, as one text, quoted the way the program expects | Empty |
| "Wait For Exit" | The action waits until the program has finished | Off |
| "Use Timeout" | Limits the wait to "Timeout (Seconds)" | Off |
| "Timeout (Seconds)" | The longest wait; only editable with "Use Timeout" on. 0 waits without limit. |
0 |
3. Behaviour¶
- The expressions are evaluated.
- The action ends – without an error message – when
- "Executeable Path" is empty,
- a path is given and no file exists there,
- "Run In" is set and the folder does not exist.
The reason is written to the log.
3. The program is started without a window.
4. Without "Wait For Exit", the action continues at once and the program runs on its own.
5. With "Wait For Exit", the action waits until the program ends. With "Use Timeout" and a
timeout above 0, it waits at most that long; the program keeps running after the timeout and
the action continues.
6. If the program cannot be started, the reason is written to the log and the action continues.
nexxcite does not read the exit code or the output of the program. To pass results back, let the program write a file and read it with Iterate File Lines.
In a container installation, only the programs contained in the container can be started.
4. Examples¶
Convert a document to PDF and wait for it.
- "Executeable Path"
/usr/bin/libreoffice - "Arguments"
--headless --convert-to pdf --outdir /data/out /data/in/offer.docx - "Wait For Exit" on, "Use Timeout" on, "Timeout (Seconds)"
120
The next command can read the result from /data/out.
5. Limitations¶
- No exit code, no output, no error variable.
- A program that hangs keeps running even after the timeout; nexxcite does not stop it.
- With several servers, the program runs on the server that runs the action.
- A program that expects input or shows a window cannot be used.