> For the complete documentation index, see [llms.txt](https://paperspace.gitbook.io/gradient/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paperspace.gitbook.io/gradient/master/machines/using-machines/wait-for-the-machine.md).

# Wait For a Machine

**Usage:**&#x20;

```
gradient machines waitfor [OPTIONS]
```

Wait for the machine with the given id to enter a certain machine state. This action polls the server and returns only when we detect that the machine has transitioned into the given state.

**Parameters:**

| Name                               | Description                              |
| ---------------------------------- | ---------------------------------------- |
| `machineId (TEXT)`                 | Id of the machine to start (required)    |
| `state [off\|serviceready\|ready]` | Name of the state to wait for (required) |
