Update symlink and crontab entries to use stable plugin paths, fixing broken scheduled scripts after plugin directory changes
From research-systemnpx claudepluginhub ttorres33/teresa-torres-plugins --plugin research-systemRepair scheduled scripts (cron jobs) when the plugin directory location changes. This command:
Define paths:
~/.claude/research-system-config/plugin (stable, never changes)${CLAUDE_PLUGIN_ROOT} (actual plugin location, may change)Check config directory:
test -d ~/.claude/research-system-config && echo "EXISTS" || echo "NOT_FOUND"mkdir -p ~/.claude/research-system-configCheck if symlink exists:
ls -la ~/.claude/research-system-config/plugin 2>/dev/null || echo "NOT_FOUND"Handle existing path:
Create/update symlink:
ln -sfn "${CLAUDE_PLUGIN_ROOT}" ~/.claude/research-system-config/pluginls -la ~/.claude/research-system-config/pluginGet current crontab:
crontab -l 2>/dev/null || echo "NO_CRONTAB"Identify research-system related entries:
fetch_papers.pymonitor_sources.pyresearch-systemCheck for hardcoded paths:
~/.claude/research-system-config/plugin/ but references research-system scripts~/.claude/plugins/cache/research-system/~/.claude/plugins/research-system//research-system/scripts/~/.claude/research-system/ (if we used that previously)For each hardcoded path found:
~/.claude/research-system-config/plugin/0 6 * * * cd ~/.claude/plugins/cache/research-system/scripts/automation && python3 fetch_papers.py0 6 * * * cd ~/.claude/research-system-config/plugin/scripts/automation && python3 fetch_papers.pyCreate updated crontab:
Apply updated crontab:
echo "[new_crontab_content]" | crontab -crontab -l | grep research-systemProvide summary:
Fix Scheduled Scripts Complete
Symlink Status:
- ~/.claude/research-system-config/plugin -> [actual plugin path]
- Status: [Created/Updated/Already correct]
Crontab Updates:
- Entries scanned: [N]
- Entries updated: [N]
- [List each updated entry if any]
Scheduled Scripts:
- fetch_papers.py: [Found at HH:MM daily / Not scheduled]
- monitor_sources.py: [Found at HH:MM daily / Not scheduled]
All scheduled scripts are now using stable paths.
If no crontab exists:
Fix Scheduled Scripts Complete
Symlink Status:
- ~/.claude/research-system-config/plugin -> [actual plugin path]
- Status: Created
Crontab Updates:
- No crontab found. Run /setup-research-automation to configure scheduled scripts.
Run this command when:
~/.research-data/*.log shows "file not found" errors for Python scripts