<divclass="main-content"data-page-type="member"id="content"pageIds="kdocs::dev.inmo.krontab//doOnceTz/dev.inmo.krontab.KronScheduler#kotlin.coroutines.SuspendFunction1[[Error type: Unresolved type for DateTimeTz],TypeParam(bounds=[kotlin.Any?])]/PointingToDeclaration//788909594">
<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":dokkaHtml/commonMain"><divclass="symbol monospace"><spanclass="token keyword">inline suspend </span><spanclass="token keyword">fun </span><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="do-once-tz.html">T</a><spanclass="token operator">></span><ahref="-kron-scheduler/index.html">KronScheduler</a><spanclass="token punctuation">.</span><ahref="do-once-tz.html"><spanclass="token function">doOnceTz</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter "><spanclass="token keyword">noinline </span>block<spanclass="token operator">: </span><spanclass="token keyword">suspend </span><spanclass="token punctuation">(</span><spanclass="token keyword"></span><spandata-unresolved-link="/&lt;Error class: unknown class&gt;///PointingToDeclaration/"><Error class: unknown class></span><spanclass="token punctuation">)</span><spanclass="token operator"> -></span><spanclass="token keyword"></span><ahref="do-once-tz.html">T</a></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="do-once-tz.html">T</a><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/InsanusMokrassar/krontab/blob/master//src/commonMain/kotlin/dev/inmo/krontab/Executes.kt#L41">source</a>)</span></span></div><pclass="paragraph">Execute <ahref="do-once-tz.html">block</a> once at the <ahref="-kron-scheduler/next.html">KronScheduler.next</a> time and return result of <ahref="do-once-tz.html">block</a> calculation.</p><pclass="paragraph">WARNING!!! If you want to launch it in parallel, you must do this explicitly.</p><pclass="paragraph">WARNING!!! In case if <ahref="-kron-scheduler/next.html">KronScheduler.next</a> of <spandata-unresolved-link="dev.inmo.krontab//&lt;this&gt;/#/PointingToCallableParameters(-1)/">this</span> instance will return null, <ahref="do-once-tz.html">block</a> will be called immediatelly</p><hr><divclass="symbol monospace"><spanclass="token keyword">inline suspend </span><spanclass="token keyword">fun </span><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="do-once-tz.html">T</a><spanclass="token operator">></span><ahref="do-once-tz.html"><spanclass="token function">doOnceTz</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">scheduleConfig<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a><spanclass="token punctuation">, </span></span><spanclass="parameter "><spanclass="token keyword">noinline </span>block<spanclass="token operator">: </span><spanclass="token keyword">suspend </span><spanclass="token punctuation">(</span><spanclass="token keyword"></span><spandata-unresolved-link="/&lt;Error class: unknown class&gt;///PointingToDeclaration/"><Error class: unknown class></span><spanclass="token punctuation">)</span><spanclass="token operator"> -></span><spanclass="token keyword"></span><ahref="do-once-tz.html">T</a></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="do-once-tz.html">T</a><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/InsanusMokrassar/krontab/blob/master//src/commonMain/kotlin/dev/inmo/krontab/Executes.kt#L63">source</a>)</span></span></div><pclass="paragraph">Will <ahref="build-schedule.html">buildSchedule</a> using <ahref="do-once-tz.html">scheduleConfig</a> and call <ahref="do-once.html">doOnce</a> on it</p><h4class="">See also</h4><divclass="table"><divclass="table-row"data-filterable-current=":dokkaHtml/commonMain"data-filterable-set=":dokkaHtml/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><ahref="build-schedule.html"><span>build</span>