once

fun once(key: String, namespace: String? = null, block: () -> Unit): Boolean

Execute block only once for a given key under the current script owner namespace.

When called inside a script execution, the default namespace is that script's owner id; outside script execution, the default namespace is "global".

Return

true if block was executed this time, false if it was already executed before.