Single-source the scheduler help from markdown the AI index can read
This commit is contained in:
@@ -59,6 +59,15 @@
|
||||
// api/savefolders.php folder grouping api/reorderarray.php
|
||||
// api/rsync_standalone.php
|
||||
require_once dirname(__DIR__) . '/include/scheduler.php';
|
||||
require_once dirname(__DIR__) . '/include/docs.php';
|
||||
|
||||
// Live values for the `$VAR` markers in pages/readme/*.md. Conf variables, plus the derived
|
||||
// path constants — those are not conf keys, but they are exactly what a reader needs resolved
|
||||
// rather than described.
|
||||
$_vv_doc_vars = array_merge(vv_conf_vars(), [
|
||||
'CUSTOM_SCRIPTS_DIR' => CUSTOM_SCRIPTS_DIR,
|
||||
'SCRIPTS_DIR' => SCRIPTS_DIR,
|
||||
]);
|
||||
|
||||
// Setup mode — auto-open a conf file and force the editing sequence
|
||||
$vv_setup_conf = preg_match('/^[\w.]+\.conf$/', $_GET['vv_setup'] ?? '')
|
||||
@@ -495,38 +504,14 @@ $runningScripts = array_unique($runningScripts);
|
||||
<span class="vv-sug-chevron">▾</span>
|
||||
<span class="vv-sug-title">How do I use this</span>
|
||||
</div>
|
||||
<!-- Rendered from pages/readme/scheduler-readme.md, not maintained here. That file is
|
||||
also what the AI tab retrieves, so the panel you read and the answer the
|
||||
assistant gives are the same text and cannot drift — the same argument that
|
||||
makes this page parse script PURPOSE blocks instead of restating them. -->
|
||||
<div class="vv-sug-body vv-info-body">
|
||||
<ul class="vv-info-cols">
|
||||
<li><strong>Toggle</strong> — saves immediately to schedule.json</li>
|
||||
<li><strong>Cron field</strong> — auto-saved on focus-out; hint shows plain English; red border = invalid</li>
|
||||
<li><strong>⚙ Cog</strong> — opens settings panel: script header + matching README/Manual sections + config fields</li>
|
||||
<li><strong>Script name</strong> — click navigates to the matching entry in the Orch tree (right panel)</li>
|
||||
<li><strong>Run</strong> — fires script immediately; resets the cron timer so next fire is one full interval later</li>
|
||||
<li><strong>Dry Run</strong> — same as Run but passes <code>--dry-run</code>; no changes written to disk</li>
|
||||
<li><strong>Log</strong> — opens script log here; auto-scrolls; use Search box to filter/highlight lines</li>
|
||||
<li><strong>Stop</strong> — SIGTERM → 3 s → SIGKILL; clears stuck lock files</li>
|
||||
<li><strong>Verbose</strong> — appends <code>--log</code> flag for per-item detail output</li>
|
||||
<li><strong>Cancel</strong> — discards changes and returns here; file is never touched until Save</li>
|
||||
<li><strong>⚡ Array events</strong> — set any cron field to <code>array_start</code> or <code>array_stop</code>; badge appears; fires on Unraid array start/stop; works on any orch or custom script</li>
|
||||
<li><strong>Arrange</strong> — drag scripts between orchs; drop to right panel removes from orch; Save Arrangement commits to master.conf</li>
|
||||
<li><strong>+ Folder</strong> — collapsible subfolder in Custom Scripts; drag scripts in</li>
|
||||
<li><strong>Suggested cron</strong> — click the cron code badge in the Orch tree to apply and save instantly</li>
|
||||
<li><strong>Status dot (tree)</strong> — green/orange/red ● = last run ok/warn/error; dim = never run; hover for detail</li>
|
||||
<li><strong>Cron Calculator</strong> — type an expression or plain English; shows description + next 5 fires; Apply pushes to last-focused cron field</li>
|
||||
<li><strong>Recent Activity</strong> — last 24 runs; click a row to open that log; auto-expands on errors</li>
|
||||
<li><strong>Recent Errors</strong> — last error per script (7 days); click to open log; auto-expands on new errors</li>
|
||||
<li><strong>Advanced</strong> — top-right button, turns blue; ⚙ shows enriched view (header + docs + config); raw conf editing unlocked</li>
|
||||
<li><strong>Log search</strong> — filter box in toolbar when log is open; highlights matches, dims others</li>
|
||||
<li><strong>← Scheduler Info</strong> — returns here from any log, editor, conf, or script view</li>
|
||||
<li class="vv-info-sep">Orchestrator & Child Behaviour</li>
|
||||
<li><strong>Orch ON</strong> — sole trigger; cron fires the orch; it calls children in sequence</li>
|
||||
<li><strong>Orch OFF</strong> — never runs automatically; children suppressed; each can get its own standalone cron</li>
|
||||
<li><strong>Child (orch ON)</strong> — toggle comments/uncomments the script in master.conf</li>
|
||||
<li><strong>Child (orch ON, no array)</strong> — orch hardcodes the call; toggle is display-only</li>
|
||||
<li><strong>Child (orch OFF)</strong> — enter a cron to run it standalone</li>
|
||||
<li><strong>Rsync badge</strong> — toggle writes TIER_RSYNC_ENABLED directly to master.conf</li>
|
||||
<li><strong>Rsync (orch OFF)</strong> — fill location + standalone cron + Save; both required for independent firing</li>
|
||||
</ul>
|
||||
<div class="vv-doc">
|
||||
<?= vv_docs_render('Plugin/unraid/pages/readme/scheduler-readme.md', $_vv_doc_vars) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user