# Notebook$stop

### Notebook$<mark style="color:purple;">stop</mark>() → self

Stop a running notebook. If the notebook isn't running, an exception will be raised.

### 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(wait_for_finish=FALSE)
Sys.sleep(1)
notebook$stop() # this will stop the notebook after 1s
```
