cron: wire bib refresh-iom for daily CMS IOM sync #343

Closed
opened 2026-04-15 03:27:24 +00:00 by kert · 1 comment
Owner

Follow-up to #304/#305/#306.

The uv run stack bib refresh-iom command is idempotent and does ingest → watch-iom → attach → sync-zotero in one pass. It needs a scheduler so the library stays up-to-date without hand-triggering.

Task:

  • Add a compose service (or schedule skill cron) that runs uv run stack bib refresh-iom nightly.
  • Surface the futurepdf.pdf CHANGED signal as a Gitea issue or Slack message so we notice when CMS posts a new transmittal schedule.
  • Consider running more frequently (every 6h) when futurepdf just changed, and backing off to daily afterward.

Acceptance: container fires automatically, log shows no human invocation, futurepdf CHANGED events auto-open an issue tagged cms-update.

Follow-up to #304/#305/#306. The `uv run stack bib refresh-iom` command is idempotent and does ingest → watch-iom → attach → sync-zotero in one pass. It needs a scheduler so the library stays up-to-date without hand-triggering. **Task:** - Add a compose service (or schedule skill cron) that runs `uv run stack bib refresh-iom` nightly. - Surface the futurepdf.pdf CHANGED signal as a Gitea issue or Slack message so we notice when CMS posts a new transmittal schedule. - Consider running more frequently (every 6h) when futurepdf just changed, and backing off to daily afterward. Acceptance: container fires automatically, log shows no human invocation, futurepdf CHANGED events auto-open an issue tagged `cms-update`.
Author
Owner

Closing — shipped in 759d8d5.

  • src/bib/iom_alert.py — file_iom_change_alert() opens a cms-update-tagged Gitea issue when watch-iom reports a futurepdf.pdf SHA-256 change. Auto-creates the label if it doesn't exist.
  • src/cli/bib.py:refresh-iom — added --file-issue/--no-file-issue flag (default True). Calls the alert when changed=True.
  • tests/bib/test_iom_alert.py — 4 unit tests.
  • Systemd user units (host-specific, not in repo): bib-refresh-iom.{service,timer} armed for daily 03:30 EDT with Persistent=true (catches up if the box was off when scheduled). First run tonight at 03:30.

Out of scope (per issue body):

  • Adaptive 6h-after-change scheduling (issue says "Consider" — daily is enough; CMS doesn't usually update mid-day)
  • Slack alternative (issue says "or")
**Closing — shipped in 759d8d5.** - `src/bib/iom_alert.py` — `file_iom_change_alert()` opens a `cms-update`-tagged Gitea issue when `watch-iom` reports a futurepdf.pdf SHA-256 change. Auto-creates the label if it doesn't exist. - `src/cli/bib.py:refresh-iom` — added `--file-issue/--no-file-issue` flag (default True). Calls the alert when changed=True. - `tests/bib/test_iom_alert.py` — 4 unit tests. - Systemd user units (host-specific, not in repo): `bib-refresh-iom.{service,timer}` armed for **daily 03:30 EDT** with `Persistent=true` (catches up if the box was off when scheduled). First run tonight at 03:30. **Out of scope (per issue body):** - Adaptive 6h-after-change scheduling (issue says "Consider" — daily is enough; CMS doesn't usually update mid-day) - Slack alternative (issue says "or")
kert closed this issue 2026-04-23 23:09:20 +00:00
Sign in to join this conversation.