# Notebook$run

### Notebook$<mark style="color:purple;">run</mark>(*wait\_for\_finish=TRUE*) → self

Run a notebook. If the notebook is already running, an exception will be raised.

### **Parameters:**

**`wait_for_finish`:&#x20;*****bool, default TRUE***\
&#x20;Whether to wait for the notebook to complete before returning. If waiting, and the notebook encounters an error during execution, an error will be raised.&#x20;

### Returns

**self (a** [**Notebook**](https://docs.redivis.com/api/client-libraries/redivis-r/reference/notebook)**)**

### Examples

```r
username <- "imathews"
workflow_name <- "example_workflow_climate_analysis:x7kh"
notebook_name <- "visualize_precipitation_trends:2f2v"

notebook <- redivis$notebook(f"{username}.{workflow_name}.{notebook_name}")
notebook$run()
```
