docs(cron): de-hardcode timezone in schedule examples#13
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03d2337a58
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| uv run --project .. python -m d_brain.cron add \ | ||
| --prompt "Собери утреннюю сводку: вчерашний daily, goals недели" \ | ||
| --cron "0 9 * * *" --tz Asia/Tashkent --id morning-brief | ||
| --cron "0 9 * * *" --tz <your-tz> --id morning-brief |
There was a problem hiding this comment.
Avoid shell-redirection placeholders in runnable examples
When the cron brain follows this Bash example before substituting placeholders, <your-tz> is parsed by the shell as input redirection from a file named your-tz, so the command fails before adding the job (or reaches argparse without a valid --tz value). Since this skill is the source the agent copies commands from, use a runnable non-hardcoded value such as ${TZ:-UTC} or make the placeholder clearly non-shell syntax.
Useful? React with 👍 / 👎.
The cron skill's examples hardcoded `--tz Asia/Tashkent` and `+05:00`, and
the brain copies them verbatim — so a fork in any other zone scheduled
reminders five hours off. The schedule machinery was already correct
(`_default_tz` reads env TZ, default UTC); only the examples taught the wrong
zone.
Use `--tz "${TZ:-UTC}"` in the runnable examples: a placeholder like
`<your-tz>` is parsed by the shell as input redirection and breaks the command
if copied as-is (Codex review), whereas ${TZ:-UTC} is runnable, reads the
user's configured zone from the env, and falls back to UTC. Verified live: with
TZ exported the job schedules in that zone, without it in UTC. README gains a
one-line TZ note. Reported by a downstream fork.
03d2337 to
29a2633
Compare
Problem (reported by a downstream fork)
The cron skill's examples hardcoded
--tz Asia/Tashkentand+05:00. The brain copies them verbatim, so a fork in any other timezone (e.g. MSK) scheduled reminders 5 hours off.The scheduling machinery itself is already correct —
_default_tz()reads envTZ(defaultUTC), andparse_schedulefalls back to it. Only the examples taught the wrong zone.Fix
vault/.claude/skills/cron/SKILL.md: replace the fixed zone/offset in every directive example with<your-tz>/<offset>placeholders, plus a callout: always pass the user's configured timezone (settings.tz/ envTZ), never a hardcoded one. (Remaining+05:00mentions are illustrative "e.g." only.)README.md: one-line note to set your ownTZ(defaults to UTC).Docs/skill only — no code change. Contract test (
test_cron_skill_contract) still green.Closes feedback item #5 (hardcoded timezone in examples).