This commit is contained in:
InsanusMokrassar 2024-02-11 06:20:56 +00:00
parent 9f76ac3298
commit 10630d52fa
4 changed files with 48 additions and 48 deletions

View File

@ -2266,7 +2266,7 @@
<img alt="Js" src="https://img.shields.io/badge/JavaScript-323330?style=for-the-badge&amp;logo=javascript&amp;logoColor=F7DF1E" />
<img alt="Linux x64" src="https://img.shields.io/badge/Linux%20x64-white?style=for-the-badge&amp;logo=linux&amp;logoColor=black" /></p>
<p><a href="https://insanusmokrassar.github.io/krontab/"><img alt="KDocs" src="https://img.shields.io/badge/KDocs-323330?style=for-the-badge&amp;logo=Kotlin&amp;logoColor=7F52FF" /></a></p>
<p>Library was created to give oppotunity to launch some things from time to time according to some schedule in
<p>Library was created to give opportunity to launch some things from time to time according to some schedule in
runtime of applications.</p>
<h2 id="how-to-use">How to use<a class="headerlink" href="#how-to-use" title="Permanent link">&para;</a></h2>
<p><strong><a href="https://insanusmokrassar.github.io/KrontabPredictor">Here</a> you may find the builder for <code>Krontab</code> templates creation.</strong></p>
@ -2312,7 +2312,7 @@ something like:</p>
</span><span id="__span-3-3"><a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="c1">// true - repeat on next time</span>
</span><span id="__span-3-4"><a id="__codelineno-3-4" name="__codelineno-3-4" href="#__codelineno-3-4"></a><span class="p">}</span>
</span></code></pre></div>
<p>An other version:</p>
<p>Another version:</p>
<div class="language-kotlin highlight"><pre><span></span><code><span id="__span-4-1"><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="n">doInfinity</span><span class="p">(</span><span class="s">&quot;/5 * * * *&quot;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-4-2"><a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="w"> </span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Called&quot;</span><span class="p">)</span>
</span><span id="__span-4-3"><a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a><span class="p">}</span>
@ -2399,7 +2399,7 @@ variations (<code>doOnceLocal</code>/<code>doWhileLocal</code>/<code>doInfinityL
<p>*Here there is an important notice, that <code>Work infinity</code> is not exactly <code>infinity</code>. Actually, that means that <code>do while
coroutine is alive</code> and in fact executing will be stopped when coroutine became cancelled.</p>
<h3 id="kronscheduler-as-a-flow">KronScheduler as a Flow<a class="headerlink" href="#kronscheduler-as-a-flow" title="Permanent link">&para;</a></h3>
<p>Any <code>KronScheduler</code>can e converted to a <code>Flow&lt;DateTime</code> using extension <code>asFlow</code>:</p>
<p>Any <code>KronScheduler</code> can be converted to a <code>Flow&lt;DateTime&gt;</code> using extension <code>asFlow</code>:</p>
<div class="language-kotlin highlight"><pre><span></span><code><span id="__span-10-1"><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">kronScheduler</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">buildSchedule</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-10-2"><a id="__codelineno-10-2" name="__codelineno-10-2" href="#__codelineno-10-2"></a><span class="w"> </span><span class="n">seconds</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-10-3"><a id="__codelineno-10-3" name="__codelineno-10-3" href="#__codelineno-10-3"></a><span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="n">every</span><span class="w"> </span><span class="m">1</span>
@ -2408,7 +2408,7 @@ coroutine is alive</code> and in fact executing will be stopped when coroutine b
</span><span id="__span-10-6"><a id="__codelineno-10-6" name="__codelineno-10-6" href="#__codelineno-10-6"></a>
</span><span id="__span-10-7"><a id="__codelineno-10-7" name="__codelineno-10-7" href="#__codelineno-10-7"></a><span class="kd">val</span><span class="w"> </span><span class="nv">flow</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">kronScheduler</span><span class="p">.</span><span class="na">asFlow</span><span class="p">()</span>
</span></code></pre></div>
<p>So, in this case any operations related to flow are available and it is expected that they will work correctly. For
<p>So, in this case any operations related to flow are available, and it is expected that they will work correctly. For
example, it is possible to use this flow with <code>takeWhile</code>:</p>
<div class="language-kotlin highlight"><pre><span></span><code><span id="__span-11-1"><a id="__codelineno-11-1" name="__codelineno-11-1" href="#__codelineno-11-1"></a><span class="n">flow</span><span class="p">.</span><span class="na">takeWhile</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-11-2"><a id="__codelineno-11-2" name="__codelineno-11-2" href="#__codelineno-11-2"></a><span class="w"> </span><span class="n">condition</span><span class="p">()</span>
@ -2417,7 +2417,7 @@ example, it is possible to use this flow with <code>takeWhile</code>:</p>
</span><span id="__span-11-5"><a id="__codelineno-11-5" name="__codelineno-11-5" href="#__codelineno-11-5"></a><span class="p">}</span>
</span></code></pre></div>
<h3 id="offsets">Offsets<a class="headerlink" href="#offsets" title="Permanent link">&para;</a></h3>
<p>Offsets in this library works via passing parameter ending with <code>o</code> in any place after <code>month</code> config. Currently
<p>Offsets in this library works via passing parameter ending with <code>o</code> in any place after <code>month</code> config. Currently,
there is only one format supported for offsets: minutes of offsets. To use time zones you will need to call <code>next</code>
method with <code>DateTimeTz</code> argument or <code>nextTimeZoned</code> method with any <code>KronScheduler</code> instance, but in case if this
scheduler is not instance of <code>KronSchedulerTz</code> it will work like you passed just <code>DateTime</code>.</p>
@ -2435,7 +2435,7 @@ scheduler is not instance of <code>KronSchedulerTz</code> it will work like you
<li>Works as <code>AND</code>: cron date time will search first day which will pass requirement according all parameters including
week days</li>
<li>You may use any related to numbers syntax with week days: <code>0-3w</code>, <code>0,1,2,3w</code>, etc.</li>
<li>Week days (like years and offsets) are optional and can be placed anywhere after <code>month</code></li>
<li>Week days (as well as years and offsets) are optional and can be placed anywhere after <code>month</code></li>
</ul>

File diff suppressed because one or more lines are too long

View File

@ -2,207 +2,207 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://docs.inmo.dev/index.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/index.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/describing/krontabscheduler.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/describing/string-format.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/introduction/faq.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/introduction/how-to-use.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/introduction/including-in-project.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/kslog/index.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/kslog/logging.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/kslog/setup.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/micro_utils/index.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/micro_utils/resources.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/navigation/index.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/navigation/getting-started.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/plagubot/index.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/plagubot/opportunities_out_of_the_box.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/services/index.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/index.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/faq.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logs.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/dsls/keyboards.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/dsls/live-location.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/dsls/text.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/guides/keyboards.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/before-any-bot-project.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/first-bot.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/including-in-your-project.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/proxy-setup.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/api-extensions.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/behaviour-builder-with-fsm.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/behaviour-builder.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/exceptions-handling.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/files-handling.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/low-level-work-with-bots.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/media-groups.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/types-conversations.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/updates-with-flows.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/updates/heroku.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/updates/long-polling.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/updates/updates-filters.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/updates/webhooks.html</loc>
<lastmod>2024-01-30</lastmod>
<lastmod>2024-02-11</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.