Skip to content

Fix scheduler templates: angle brackets break .cmd files#51

Merged
mspinola merged 1 commit into
mainfrom
fix-cmd-template-angle-brackets
Jul 26, 2026
Merged

Fix scheduler templates: angle brackets break .cmd files#51
mspinola merged 1 commit into
mainfrom
fix-cmd-template-angle-brackets

Conversation

@mspinola

Copy link
Copy Markdown
Owner

What

Fixes the scheduler wrapper templates (added in #49) so they don't fail with a cryptic syntax error when copied.

Why

Copying run-prices.cmd into a scheduler folder and running it failed before any editing:

> .\run-prices.cmd
The syntax of the command is incorrect.

Cause: cmd parses < and > as redirection operators everywhere in a .cmd file — including REM comment lines. The <STORE> / <VENV> placeholder style, which is fine in the prose docs, is a hard syntax error inside the script itself, so the file breaks whether or not the user has replaced the path lines yet. The .sh wrappers carry the same latent trap (an unedited <...> is a shell redirection).

Changes

  • All four templates (docs/examples/{windows,linux}/run-{prices,cot}.{cmd,sh}) now use plain-text REPLACE_WITH_STORE_PATH / REPLACE_WITH_VENV_PATH / REPLACE_WITH_DATABENTO_KEY markers, with a header comment explaining why angle brackets can't appear in the file.
  • WINDOWS_SCHEDULING.md and LINUX_SCHEDULING.md inline wrapper blocks and placeholder notes updated to match, clarifying that <DIR> in the task/crontab commands is still fine (quoted or typed at the prompt).

Docs/examples only.

🤖 Generated with Claude Code

Copying run-prices.cmd and running it failed with "The syntax of the
command is incorrect" before any editing, because cmd parses < and > as
redirection operators everywhere in a .cmd, including REM comment lines.
The <STORE> / <VENV> placeholder style, fine in the docs, is a syntax
error inside the script itself. The .sh wrappers have the same latent
trap (an unedited <...> is a shell redirection).

- Rewrite all four templates to use plain-text REPLACE_WITH_* markers,
  with a header comment explaining why angle brackets can't be used.
- Update the inline wrapper blocks and placeholder notes in
  WINDOWS_SCHEDULING.md and LINUX_SCHEDULING.md to match, and clarify
  that <DIR> in the task/crontab commands is still normal fill-in
  notation (quoted or typed at the prompt, so it's safe there).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mspinola
mspinola merged commit f9f58e6 into main Jul 26, 2026
5 checks passed
@mspinola
mspinola deleted the fix-cmd-template-angle-brackets branch July 26, 2026 15:54
mspinola added a commit that referenced this pull request Jul 26, 2026
The scheduler wrappers called cotdata-update, which accepts every flag. Now that
cotdata-cot and cotdata-prices exist (#55), the wrappers use the one matching
their job, so a host is scoped by construction rather than by remembering.

The failure this closes: a price box that can also run --cot-all is one edited
line away from becoming a second COT producer racing the first, which is the
manifest read-modify-write hazard the split exists to contain. cotdata-prices
refuses --cot-all outright.

Both platforms, since the two scheduling docs deliberately mirror each other:
run-prices.cmd and run-prices.sh call cotdata-prices, run-cot.cmd and run-cot.sh
call cotdata-cot. Each wrapper says why in a comment.

Prose updated where it named the wrapper's binary specifically: the "two wrapper
scripts" intro, the full-path-not-PATH note, the "Task Scheduler can't find"
heading, the NDU interactive-session example, the logging variant, and the cron
bare-environment note. References to cotdata-update that are genuinely about the
general CLI (--check, --help, manual one-off runs, the setup guide's install
verification) are left alone.

Angle-bracket-free .cmd invariant preserved (#51). Suite 127 passed.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant