Built 26/04/15 21:30commit c6006a5
Automation
中文 | English
Use macOS launchd for periodic Codex maintenance runs.
Config
Global config lives at ~/.llm-wiki/config.json.
Suggested multi-task scheduler block:
json
{
"scheduler": {
"enabled": true,
"codex_path": "/absolute/path/to/codex",
"log_dir": "/Users/name/Library/Logs/llm-wiki",
"max_runtime_minutes": 20
},
"schedulers": {
"content_patrol": {
"interval_minutes": 30,
"label": "com.bytedance.llmwiki.maintenance.content",
"prompt": "$llm-wiki 对这个 vault 做一次内容巡检。"
},
"taxonomy_patrol": {
"interval_minutes": 1440,
"label": "com.bytedance.llmwiki.maintenance.taxonomy",
"max_runtime_minutes": 45,
"prompt": "$llm-wiki 对这个 vault 做一次目录结构巡检。"
}
}
}Scripts
scripts/run_scheduled_maintenance.pyruns one non-interactive Codex maintenance passscripts/manage_launch_agent.pyinstalls, uninstalls, checks status, or runs one or many named maintenance tasks immediatelyscripts/move_raw_sources.pysafely reorganizesraw/while rewriting impacted repo linksscripts/extract_visual_sources.pyextracts OCR text from screenshots and local raw images before ingest
Notes
interval_minutesmaps to launchdStartInterval- reinstall the launch agents after changing schedule-related config
- log files are written outside the repo to avoid polluting git history
- in named-task mode, each task should have its own lock file and state file defaults so content patrols and taxonomy patrols do not block each other
- scheduled runs should persist structured state files so status checks can report
running,completed,timed_out,failed, orskipped - if one run of a given task times out or fails, the next run of the same task should receive that partial summary as continuation context
- scheduled runs should use a short prompt plus structured stdin context so Codex starts from repository facts instead of a long natural-language brief
- keep taxonomy refactors on a slower cadence than content patrols unless the user explicitly wants aggressive automated reorganization