---
title: "onRunOnce"
sidebar_label: "onRunOnce"
description: "Kotlin binding reference: onRunOnce."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[FunctionModel](index.md)/[onRunOnce](onRunOnce.md)

# onRunOnce

[common]\
fun [onRunOnce](onRunOnce.md)(name: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), body: [RunOnceBody](../RunOnceBody/index.md)): [FunctionModel](index.md)

Bind the body of the run-once phase named [name](onRunOnce.md) (a single pass per session). Returns this for chaining.