# jobs

> Jobs: a module's verb with its input, run in the background for the person who submits it. A job is accepted, then running, then done, failed or cancelled. You, and your organization's owners and admins, read and cancel it.

Jobs: a module's verb with its input, run in the background for the person who submits it. A job is accepted, then running, then done, failed or cancelled. You, and your organization's owners and admins, read and cancel it.

## nexus jobs submit

```sh
nexus jobs submit <product>/<capability> <verb> [--input <json>] [--team <slug>]
```

Submit a job: a module's verb with its input, run in the background for you; prints the job's id. The module is <product>/<capability>, such as robustness/review.

| Option | Meaning |
| --- | --- |
| `--input <json>` | The verb's input, a JSON object (default: {}) |
| `--team <slug>` | The team the job's model calls go to, by slug or id (default: yours) |

```sh
nexus jobs submit robustness/review run --input '{"repo":"https://github.com/nexus-demo/hello-factory"}'
```

## nexus jobs get

```sh
nexus jobs get <id>
```

A job's state: accepted, running, done, failed or cancelled.

```sh
nexus jobs get job_…
```

## nexus jobs cancel

```sh
nexus jobs cancel <id>
```

Cancel a job no worker has taken yet; a running or finished job stays as it is.

```sh
nexus jobs cancel job_…
```

## nexus jobs result

```sh
nexus jobs result <id>
```

A job's result, once it is done or failed.

```sh
nexus jobs result job_… --json
```
