-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcrontab.example
More file actions
59 lines (49 loc) · 3.72 KB
/
Copy pathcrontab.example
File metadata and controls
59 lines (49 loc) · 3.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# ============================================================================
# SWE Squad — recommended cron schedules
# ============================================================================
#
# Install with:
# crontab crontab.example (replace current crontab)
# crontab -l | cat - crontab.example | crontab - (append to existing)
#
# Prerequisites:
# - Python 3.10+ with deps installed: pip install -r requirements.txt
# - .env file with required credentials (TELEGRAM_BOT_TOKEN, etc.)
# - GitHub CLI (gh) authenticated for the issues/repos commands
#
# Update /path/to/SWE-Squad to your actual install path.
# ============================================================================
# Environment — adjust as needed
SHELL=/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin
SWE_SQUAD_DIR=/path/to/SWE-Squad
# ── Scan cycle every 30 minutes ──────────────────────────────────────────────
# Runs the full monitor -> triage -> investigate -> gate cycle
*/30 * * * * cd $SWE_SQUAD_DIR && python scripts/ops/swe_team_runner.py -v >> logs/cron.log 2>&1
# ── Daily summary at 8am ─────────────────────────────────────────────────────
# Sends a Telegram summary of open tickets by severity and status
0 8 * * * cd $SWE_SQUAD_DIR && python scripts/ops/swe_cli.py report daily >> logs/cron.log 2>&1
# ── Status check every hour ──────────────────────────────────────────────────
# Sends a quick Telegram status snapshot (last cycle, gate verdict, open count)
0 * * * * cd $SWE_SQUAD_DIR && python scripts/ops/swe_cli.py report status >> logs/cron.log 2>&1
# ── Weekly creative proposals on Monday at 9am ───────────────────────────────
# Generates improvement / tech-debt proposals (only when gate is not blocked)
0 9 * * 1 cd $SWE_SQUAD_DIR && python scripts/ops/swe_team_runner.py --creative -v >> logs/cron.log 2>&1
# ── Test-only verification twice daily (noon and midnight) ───────────────────
# Re-runs tests on in_development/in_review tickets without a full cycle
0 0,12 * * * cd $SWE_SQUAD_DIR && python scripts/ops/swe_team_runner.py --test-only -v >> logs/cron.log 2>&1
# ── Supabase keep-alive (daily at noon) ─────────────────────────────────────
# Prevents Supabase free-tier from pausing after 7 days of inactivity.
# Only fires a ping if no organic traffic in the last 5 days.
0 12 * * * cd $SWE_SQUAD_DIR && python scripts/ops/swe_team_runner.py --keep-alive -v >> logs/cron.log 2>&1
# ── Webhook listener (persistent, via systemd — preferred) ─────────────────
# The webhook listener is best run as a systemd user service:
# systemctl --user enable --now swe-webhook.service
# If systemd is not available, run via cron @reboot:
# @reboot cd $SWE_SQUAD_DIR && python3 scripts/ops/webhook_listener.py >> logs/webhook.log 2>&1 &
# PR sync — links PRs to knowledge graph (runs every 5 min)
*/5 * * * * cd $SWE_SQUAD_DIR && python3 scripts/ops/pr_sync.py >> logs/pr_sync.log 2>&1
# ── Manual code propagation (fallback if webhook is down) ──────────────────
# Propagate code to all workers every 15 min as a safety net.
# Not needed if webhook_listener.py or git_push_propagate.sh is in use.
# */15 * * * * cd $SWE_SQUAD_DIR && bash scripts/ops/propagate.sh >> logs/propagate.log 2>&1