Skip to content

docs(cron): de-hardcode timezone in schedule examples#13

Merged
smixs merged 1 commit into
mainfrom
docs/cron-tz-agnostic
Jun 17, 2026
Merged

docs(cron): de-hardcode timezone in schedule examples#13
smixs merged 1 commit into
mainfrom
docs/cron-tz-agnostic

Conversation

@smixs

@smixs smixs commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Problem (reported by a downstream fork)

The cron skill's examples hardcoded --tz Asia/Tashkent and +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 env TZ (default UTC), and parse_schedule falls 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 / env TZ), never a hardcoded one. (Remaining +05:00 mentions are illustrative "e.g." only.)
  • README.md: one-line note to set your own TZ (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).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread vault/.claude/skills/cron/SKILL.md Outdated
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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.
@smixs smixs force-pushed the docs/cron-tz-agnostic branch from 03d2337 to 29a2633 Compare June 17, 2026 02:02
@smixs smixs merged commit 60853b1 into main Jun 17, 2026
1 check passed
@smixs smixs deleted the docs/cron-tz-agnostic branch June 17, 2026 02:15
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