---
url: /process-functions/process-status.md
description: Returns the state of a process run started by process.execute.
---

# process.status&#x20;

Returns the state of a process run started by [process.execute](/process-functions/process-execute).

```js
process.status(jobId)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `jobId` | `string` | The job id returned by `process.execute`. |

## Returns

The run's state, or `null` when the job can't be found. It has:

* `id` (string): the job id.
* `status` (string): `created`, `started`, `finished`, `aborted`, `waitingForUser` or `paused`.
* `running` (boolean): `true` while the process is still running.
* `success` (boolean): `true` if the process finished, `false` if it was aborted, or `null` while it's running.
* `modelId` (string): the id of the model the process ran in.
* `processId` (string): the process's id.
* `processName` (string): the process's name.
* `startTime` (string): when the run started, as an ISO date.
* `finishTime` (string): when the run finished, as an ISO date, or `null` while it's running.
* `duration` (number): the seconds the run took, or has taken so far.
* `cancelled` (boolean): `true` if the run was cancelled.
* `killed` (boolean): `true` if the run was killed.
* `customStatus` (string): the custom status set by the process.

## Examples

::: code-group

```js [status.js]
const jobId = process.execute("yourProcess");
const job = process.status(jobId);
console.log(job.status + " in " + job.duration + "s");
```

```text [Output]
finished in 12s
```

:::

```js
// Start a process without waiting, then check on it later.
const jobId = process.execute("yourProcess", true);
// ...
if (process.status(jobId).running) {
    console.log("Still running");
}
```

## Related

* [process.execute](/process-functions/process-execute)
