Cron & Automation Infrastructure
Status: Production (14 active cron jobs)
Active Cron Jobs
Section titled “Active Cron Jobs”| Schedule | Script | Purpose |
|---|---|---|
| 7:05 AM | morning-briefing.sh | 9-source morning digest to Telegram |
| 7:00 AM | cron-canvas-sync.sh | Canvas LMS assignment sync |
| 8 AM, 2 PM, 8 PM | deadline-watcher.sh | 48h deadline alerts via Telegram |
| Every 15 min | cron-telegram-watchdog.sh | Bot health check + auto-restart |
| Every 15 min | domain-sync.sh | Domain state JSON generation |
| Every 4h | NC v5 auto-sync | Snapshot + cloud redeploy |
| 7 AM daily | news-scanner.py | AI/tech news scan |
| Every 6h | github-enrichment | Query repos for project status |
| 11 PM daily | track-costs.sh | Daily cost summary to Telegram |
| Sunday 8 PM | cron-weekly-review.sh | Weekly review generation |
| Monday 7 AM | week-ahead.sh | Study plan generator |
| Every 3h | Plaud sync (launchd) | Audio recording transcription |
| Nightly | ceo-aggregate.sh | Executive summary from all domains |
| 9 PM daily | habit-checkin.sh | Family habit check-in |
Watchdog System
Section titled “Watchdog System”Telegram Watchdog
Section titled “Telegram Watchdog”- Runs every 15 minutes
- Checks: launchd service loaded, daemon PID exists, tmux session alive
- Auto-restarts via
launchctl kickstartif down - Sends Telegram alert on failure/recovery (rate-limited to 1/hour)
System Watchdog
Section titled “System Watchdog”- Process checks, disk space monitoring
- Auto-restart with cooldown
- Alert escalation via Telegram
Telegram Notify Helper
Section titled “Telegram Notify Helper”- Reusable script for any cron job to send Telegram alerts
- Used by watchdog, deadline watcher, grade alerts, cost tracker
Alert Agents
Section titled “Alert Agents”| Script | Trigger | Action |
|---|---|---|
| grade_alerts.py | Canvas grade change detected | Telegram notification |
| followup_alerts.py | Consulting deal stale >7 days | Telegram reminder |
| birthday_alerts.py | Birthday at 7/3/1/0 day marks | Telegram + gift reminder |
| deadline-watcher.sh | Assignment due within 48h | Telegram alert |
Common Issues and Fixes
Section titled “Common Issues and Fixes”- ValueError in cron parsing: Added try/except for
*in cron expressions - iCloud deadlock: Keep local backup on copy failure
- Timeout protection: 120s timeouts on all sync scripts via perl alarm wrapper
- Zombie processes: Killed ~20 hanging processes from iCloud file locks
- PATH issues: Added
/opt/homebrew/binto crontab PATH - Daemon restart: Changed KeepAlive to unconditional
<true/>
Launch Agents (launchd)
Section titled “Launch Agents (launchd)”40+ launch agents managed via launchd. Key ones:
- Telegram bot daemon (KeepAlive: true)
- Audio sync (every 3h)
- Various deprecated agents flagged for cleanup
Crontab Management
Section titled “Crontab Management”Maintain your crontab in a versioned config file. Install with crontab path/to/config.txt. This keeps cron configuration in source control and makes it reproducible.