#!/bin/bash
# Ideal Cron Setup for Clawdbot Memory System

# 1. Memory Git Backup (daily 2am AEST = 15:00 UTC)
clawdbot cron add \
  --name "memory-git-backup" \
  --schedule "0 15 * * * @ UTC" \
  --task "Run /root/clawd/scripts/git-memory-backup.sh" \
  --agent main

# 2. Memory Cleanup (weekly Sunday 3am AEST = 16:00 UTC Saturday)
clawdbot cron add \
  --name "memory-cleanup" \
  --schedule "0 16 * * 6 @ UTC" \
  --task "Review and condense memory files, update MEMORY.md" \
  --agent main

# 3. Health Check (hourly during AEST business hours)
clawdbot cron add \
  --name "system-health" \
  --schedule "0 21-5 * * 1-5 @ UTC" \
  --task "Check all APIs: DeepSeek, Brave, Notion, Growth Engine" \
  --agent main

# 4. Daily Brief (6:30am AEST = 19:30 UTC)
clawdbot cron add \
  --name "morning-brief" \
  --schedule "30 19 * * * @ UTC" \
  --task "Generate morning operations brief" \
  --agent main

# 5. Evening Sync (6pm AEST = 7:00 UTC)
clawdbot cron add \
  --name "evening-sync" \
  --schedule "0 7 * * * @ UTC" \
  --task "Sync all systems, update Notion, prepare next day" \
  --agent main

echo "Ideal cron setup created"
echo "Times are in UTC (convert: AEST = UTC+11)"