mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
2 lines
8.9 KiB
JavaScript
2 lines
8.9 KiB
JavaScript
import{_ as t,o as i,c as a,ag as e}from"./chunks/framework.DEqXEGcv.js";const c=JSON.parse('{"title":"Schedule Commands","description":"","frontmatter":{},"headers":[],"relativePath":"cli/schedule.md","filePath":"cli/schedule.md","lastUpdated":1771161622000}'),d={name:"cli/schedule.md"};function h(l,s,n,p,k,r){return i(),a("div",null,[...s[0]||(s[0]=[e('<h1 id="schedule-commands" tabindex="-1">Schedule Commands <a class="header-anchor" href="#schedule-commands" aria-label="Permalink to "Schedule Commands""></a></h1><p>Manage cron-based schedules for bots. All schedule commands require <code>--bot <id></code> to specify the bot.</p><h2 id="schedule-list" tabindex="-1">schedule list <a class="header-anchor" href="#schedule-list" aria-label="Permalink to "schedule list""></a></h2><p>List all schedules for a bot.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">memoh</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> schedule</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> list</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --bot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">bot_i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span></span></code></pre></div><h2 id="schedule-get" tabindex="-1">schedule get <a class="header-anchor" href="#schedule-get" aria-label="Permalink to "schedule get""></a></h2><p>Get a schedule by ID.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">memoh</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> schedule</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> get</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --bot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">bot_i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span></span></code></pre></div><h2 id="schedule-create" tabindex="-1">schedule create <a class="header-anchor" href="#schedule-create" aria-label="Permalink to "schedule create""></a></h2><p>Create a new schedule. Prompts for name, description, cron pattern, command, and optional max calls.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">memoh</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> schedule</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> create</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [options] --bot </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">bot_id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--name <name></code></td><td>Schedule name</td></tr><tr><td><code>--description <desc></code></td><td>Description</td></tr><tr><td><code>--pattern <pattern></code></td><td>Cron pattern (e.g. <code>0 9 * * *</code> for daily at 9am)</td></tr><tr><td><code>--command <cmd></code></td><td>Command to run in the bot container</td></tr><tr><td><code>--max_calls <n></code></td><td>Max executions (optional, empty for unlimited)</td></tr><tr><td><code>--enabled</code></td><td>Create as enabled</td></tr><tr><td><code>--disabled</code></td><td>Create as disabled</td></tr></tbody></table><h2 id="schedule-update" tabindex="-1">schedule update <a class="header-anchor" href="#schedule-update" aria-label="Permalink to "schedule update""></a></h2><p>Update a schedule.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">memoh</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> schedule</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> update</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [options] --bot </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">bot_id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--name <name></code></td><td>Schedule name</td></tr><tr><td><code>--description <desc></code></td><td>Description</td></tr><tr><td><code>--pattern <pattern></code></td><td>Cron pattern</td></tr><tr><td><code>--command <cmd></code></td><td>Command</td></tr><tr><td><code>--max_calls <n></code></td><td>Max executions</td></tr><tr><td><code>--enabled</code></td><td>Enable</td></tr><tr><td><code>--disabled</code></td><td>Disable</td></tr></tbody></table><h2 id="schedule-toggle" tabindex="-1">schedule toggle <a class="header-anchor" href="#schedule-toggle" aria-label="Permalink to "schedule toggle""></a></h2><p>Enable or disable a schedule (flip current state).</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">memoh</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> schedule</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> toggle</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --bot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">bot_i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span></span></code></pre></div><h2 id="schedule-delete" tabindex="-1">schedule delete <a class="header-anchor" href="#schedule-delete" aria-label="Permalink to "schedule delete""></a></h2><p>Delete a schedule.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">memoh</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> schedule</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> delete</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --bot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">bot_i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span></span></code></pre></div>',22)])])}const g=t(d,[["render",h]]);export{c as __pageData,g as default};
|