Files
clawdbot/skills/claude-code-usage/CRON_SETUP.md
James 36eb4a7b3b Add skills, learnings & memory updates (2026-01-26)
- New skills: clawddocs, claude-code-usage, summarize, homeassistant, humanizer, self-improving-agent
- Add .learnings/ for self-improvement tracking
- Document proaktive cron config (LRN-20260126-001)
- Update USER.md: Löchgau as former residence
- Update TOOLS.md: Peekaboo workaround
- Memory files for 2026-01-25 and 2026-01-26
2026-01-26 09:26:26 +01:00

1.5 KiB

Setting Up Automated Monitoring

Add this to your Clawdbot Gateway config (~/.clawdbot/clawdbot.json):

{
  "cron": {
    "jobs": [
      {
        "name": "claude-usage-monitor",
        "schedule": "*/30 * * * *",
        "sessionTarget": "telegram:YOUR_CHAT_ID",
        "payload": {
          "kind": "exec",
          "command": "/Users/ali/clawd/skills/claude-code-usage/scripts/monitor-usage.sh"
        }
      }
    ]
  }
}

Replace YOUR_CHAT_ID with your Telegram chat ID (usually your phone number).

Then restart Clawdbot:

clawdbot daemon restart

Option 2: System Cron (Alternative)

Add to your system crontab:

crontab -e

Add this line:

*/30 * * * * /Users/ali/clawd/skills/claude-code-usage/scripts/monitor-usage.sh > /tmp/claude-monitor.log 2>&1

Note: System cron won't send Telegram notifications directly. You'll need to check /tmp/claude-monitor.log for reset notifications.

Option 3: Manual Testing

Test the monitor anytime:

/Users/ali/clawd/skills/claude-code-usage/scripts/monitor-usage.sh

Verification

Check if monitoring is working:

# View state file
cat /tmp/claude-usage-state.json

# View last check time
cat /tmp/claude-usage-state.json | grep last_check

Notification Format

When a reset is detected, you'll receive:

🎉 Claude Code Session Reset!

⏱️  Your 5-hour quota has reset
📊 Usage: 2%
⏰ Next reset: 4h 58m

Fresh usage available! 🦞