# Cognitive Memory Systemd Timers Reference copies of the systemd user units that automate memory maintenance. ## Services | Unit | Schedule | What it does | |------|----------|-------------| | `cognitive-memory-daily` | daily | Decay scores, regenerate CORE.md, git sync — for ALL graphs | | `cognitive-memory-embed` | hourly | Refresh embeddings (skips if unchanged) — for ALL graphs | | `cognitive-memory-weekly` | weekly | Run reflection cycle — for ALL graphs | All three services now call `scripts/maintain-all-graphs.sh` instead of individual `claude-memory` commands. The script discovers every graph via `claude-memory graphs` (default graph + named graphs under `~/.local/share/cognitive-memory-graphs/`) and runs the appropriate command for each one, passing `--graph ` for non-default graphs. Named graph directories that do not exist on disk are silently skipped. ## Scripts | Script | Purpose | |--------|---------| | `scripts/maintain-all-graphs.sh` | Loop decay/core/embed/reflect over all graphs | | `scripts/memory-git-sync.sh` | Git commit+push for default graph and all named git repos | ## Install / Update ```bash # Copy units into place (adjust source path to your cognitive-memory install) CMDIR=~/.claude/skills/cognitive-memory # or /mnt/NV2/Development/cognitive-memory cp "$CMDIR"/systemd/*.service "$CMDIR"/systemd/*.timer \ ~/.config/systemd/user/ # Reload and enable systemctl --user daemon-reload systemctl --user enable --now cognitive-memory-daily.timer systemctl --user enable --now cognitive-memory-embed.timer systemctl --user enable --now cognitive-memory-weekly.timer ``` ## Verify ```bash systemctl --user list-timers 'cognitive-memory-*' systemctl --user start cognitive-memory-daily.service # manual test run journalctl --user -u cognitive-memory-daily.service --since today ``` ## Manual test (single graph) ```bash # Default graph only claude-memory decay && claude-memory core # Named graph claude-memory --graph paper-dynasty decay && claude-memory --graph paper-dynasty core # All graphs at once (adjust path to your install) /path/to/cognitive-memory/scripts/maintain-all-graphs.sh --daily ```