<divclass="main-content"id="content"pageIds="kdocs::dev.inmo.krontab//doOnce/dev.inmo.krontab.KronScheduler#kotlin.coroutines.SuspendFunction1[[Error type: Unresolved type for DateTime],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.html">T</a><spanclass="token operator">></span><ahref="-kron-scheduler/index.html">KronScheduler</a><spanclass="token punctuation">.</span><ahref="do-once.html"><spanclass="token function">doOnce</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.html">T</a></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="do-once.html">T</a><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/InsanusMokrassar/krontab/blob/master//src/commonMain/kotlin/dev/inmo/krontab/Executes.kt#L10">source</a>)</span></span></div><pclass="paragraph">Execute <ahref="do-once.html">block</a> once at the <ahref="-kron-scheduler/next.html">KronScheduler.next</a> time and return result of <ahref="do-once.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.html">block</a> will be called immediately</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.html">T</a><spanclass="token operator">></span><ahref="do-once.html"><spanclass="token function">doOnce</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.html">T</a></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="do-once.html">T</a><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/InsanusMokrassar/krontab/blob/master//src/commonMain/kotlin/dev/inmo/krontab/Executes.kt#L50">source</a>)</span></span></div><pclass="paragraph">Will <ahref="build-schedule.html">buildSchedule</a> using <ahref="do-once.html">scheduleConfig</a> and call <ahref="do-once.html">doOnce</a> on it</p><h4class="">See also</h4><divdata-togglable="See also"><divclass="table"data-togglable="See also"><divclass="table-row"data-filterable-current=":dokkaHtml/commonMain"data-filterable-set=":dokkaHtml/commonMain"><divclass="main-subrow keyValue WithExtraAttributes"><divclass=""><spanclass="inline-flex"><div><ahref="buil