# libtmux.Server.run_hook

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/hooks.py#L80
- **Inherited from:** libtmux.hooks.HooksMixin
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-server-run_hook/

```
libtmux.Server.run_hook(
    self,
    hook: str,
    global_: bool | None = None,
    scope: OptionScope
    | _DefaultOptionScope
    | None = DEFAULT_OPTION_SCOPE,
) -> Self
```

Run a hook immediately. Useful for testing.

## Parameters

- `hook` (`str`)
- `global_` (`bool | None`)
- `scope` (`OptionScope | _DefaultOptionScope | None`)
