> For AI agents: the complete documentation index is available at https://www.jumpserver.com/docs/llms.txt, the full documentation bundle is available at https://www.jumpserver.com/docs/llms-full.txt.

# Adhoc

**Adhoc** runs a command once against one or more authorized assets. It is the
fast path for day-to-day operations: select the targets, enter the run user and
the command, execute, and read the result per asset without logging in to each
machine. Nothing is saved unless you choose to save the command as a template.

![Figure 1: The Adhoc page](/images/v5/jumpserver/v5_admin_wb_adhoc_01.png)

## Prerequisites

- The **Job Center** feature is enabled by an administrator in
  [Feature Settings](https://www.jumpserver.com/docs/features/system-settings/general/features.md). When it is disabled, the
  Job Center entries are hidden.
- Your role grants the permissions required to view and execute jobs.
- Your account is authorized for the target assets, including the account you
  intend to run as.

## Execute a command


1

In **Selected assets**, click **Select assets** and choose one or more authorized
hosts or nodes. The selected targets appear in the list.

2

Enter the **Run user**, for example `root`. Autocomplete suggests usernames that
exist on the selected assets.

3

Choose an **Account policy** for assets where the run user does not exist.

4

Choose the **Module** that matches the command: Shell, Powershell, Raw, Python,
MySQL, PostgreSQL, SQL Server, or CloudEngine.

5

Type the command in the editor. Optionally set a timeout and a running path, then
click **Execute**.

6

If some assets cannot run the command, review the runnable and unrunnable lists
and confirm the remaining targets. Output streams into the terminal below.

![Figure 2: Adhoc execution output](/images/v5/jumpserver/job_adhoc_exec.png)

## Field reference

| Field           | Description                                                                                                |
| --------------- | ---------------------------------------------------------------------------------------------------------- |
| Selected assets | Authorized hosts or nodes that receive the command                                                         |
| Run user        | Login account used on the targets                                                                          |
| Account policy  | What to do when the run user is missing: **Skip this asset**, **Privileged first**, or **Privileged only** |
| Module          | Interpreter for the command; Shell, Powershell, Raw, Python, and database modules are available            |
| Command         | The command text executed on every selected asset                                                          |
| Timeout         | Optional time limit; `-1` means no timeout                                                                 |
| Running path    | Optional working directory; otherwise the user's home directory is used                                    |
| Output          | Combined per-asset output, with refresh and download actions                                               |

The toolbar also provides **Open command** to load a saved script template,
**Save command** to store the current command as a template, and a help entry for
template variables. Commands loaded from a template prompt for any variables
before running.

## Notes


Warning

The command executes immediately on every selected asset. Check the command text
and the target list before clicking **Execute**.


Note

Adhoc execution is disabled while the global (root) organization is selected.
Switch to a specific organization first. Every run is recorded on
[Execution History](https://www.jumpserver.com/docs/features/workbench/job-center/execution-history.md).
