{
  "feishu_sync_system": {
    "description": "飞书小说章节自动同步系统",
    "version": "1.0.0",
    "created": "2026-03-30",
    "author": "OpenClaw 番茄小说助手",
    "novel": "末日重生：开局囤货十亿物资",
    
    "cron_jobs": [
      {
        "name": "daily_full_sync",
        "description": "每日全量同步",
        "schedule": "0 2 * * *",  // 每天凌晨2点
        "command": "cd /root/.openclaw/workspace/feishu_sync_system && python3 sync_chapters.py",
        "enabled": true,
        "notify_on_success": true,
        "notify_on_failure": true
      },
      {
        "name": "hourly_check",
        "description": "每小时检查新章节",
        "schedule": "0 * * * *",  // 每小时整点
        "command": "cd /root/.openclaw/workspace/feishu_sync_system && python3 monitor_new_chapters.py --check-only",
        "enabled": true,
        "notify_on_success": false,
        "notify_on_failure": true
      },
      {
        "name": "realtime_monitor",
        "description": "实时监控（常驻进程）",
        "schedule": "@reboot",  // 系统启动时
        "command": "cd /root/.openclaw/workspace/feishu_sync_system && nohup python3 monitor_new_chapters.py > monitor.log 2>&1 &",
        "enabled": true,
        "notify_on_success": true,
        "notify_on_failure": true
      },
      {
        "name": "weekly_report",
        "description": "每周生成同步报告",
        "schedule": "0 9 * * 1",  // 每周一上午9点
        "command": "cd /root/.openclaw/workspace/feishu_sync_system && python3 sync_chapters.py --report-only",
        "enabled": true,
        "notify_on_success": true,
        "notify_on_failure": true
      }
    ],
    
    "notification_settings": {
      "channel": "feishu",
      "success_template": "✅ 章节同步完成\n📖 小说: {novel}\n📊 已同步: {synced}/{total} 章\n⏰ 时间: {time}",
      "failure_template": "❌ 章节同步失败\n📖 小说: {novel}\n🔍 错误: {error}\n⏰ 时间: {time}",
      "new_chapter_template": "📢 发现新章节\n📖 小说: {novel}\n📝 章节: 第{chapter}章 - {title}\n📊 字数: {words} 字\n⏰ 时间: {time}"
    },
    
    "sync_settings": {
      "batch_size": 5,
      "max_retries": 3,
      "retry_delay_seconds": 2,
      "rate_limit_per_minute": 30,
      "skip_backup_files": true,
      "skip_quality_reports": true,
      "include_metadata": true
    },
    
    "paths": {
      "novel_root": "/root/.openclaw/workspace/tomato-novel/books/末日重生-开局囤货十亿物资",
      "chapters_dir": "chapters",
      "sync_state": "/root/.openclaw/workspace/feishu_sync_system/sync_state.json",
      "logs_dir": "/root/.openclaw/workspace/feishu_sync_system/logs",
      "reports_dir": "/root/.openclaw/workspace/feishu_sync_system/reports"
    },
    
    "backup_settings": {
      "enabled": true,
      "keep_days": 30,
      "backup_dir": "/root/.openclaw/workspace/feishu_sync_system/backups",
      "compress_backups": true
    },
    
    "monitoring": {
      "check_interval_seconds": 300,
      "max_log_size_mb": 100,
      "alert_on_missing_chapters": true,
      "alert_on_sync_failure": true,
      "health_check_url": null
    }
  }
}