-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcrontab.example
More file actions
59 lines (50 loc) · 3.29 KB
/
crontab.example
File metadata and controls
59 lines (50 loc) · 3.29 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
# =============================================================================
# Corellis Controller — Recommended Crontab
# =============================================================================
#
# Install:
# crontab crontab.example
#
# Or merge into existing crontab:
# crontab -l | cat - crontab.example | crontab -
#
# All jobs log to /tmp/corellis-cron-*.log for debugging.
# Adjust paths if your workspace is not at ~/workspace.
#
# =============================================================================
SHELL=/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin
# ---------------------------------------------------------------------------
# Gateway watchdog — restart if crashed (every 5 min)
# ---------------------------------------------------------------------------
*/5 * * * * pgrep -f "openclaw gateway" > /dev/null || openclaw gateway start >> /tmp/corellis-cron-watchdog.log 2>&1
# ---------------------------------------------------------------------------
# Bottleneck inbox poll — check for new escalations (every 5 min)
# ---------------------------------------------------------------------------
*/5 * * * * cd ~/workspace && bash scripts/poll-bottleneck-inbox.sh >> /tmp/corellis-cron-bottleneck.log 2>&1
# ---------------------------------------------------------------------------
# Goal patrol — check active goals for stuck lobsters (every 30 min)
# Only runs if goals.json has active goals; $0 cost when idle.
# ---------------------------------------------------------------------------
*/30 * * * * cd ~/workspace && bash scripts/patrol.sh >> /tmp/corellis-cron-patrol.log 2>&1
# ---------------------------------------------------------------------------
# Skill submissions — scan for new skill submissions (every 30 min)
# ---------------------------------------------------------------------------
*/30 * * * * cd ~/workspace && bash scripts/poll-skill-submissions.sh >> /tmp/corellis-cron-skill-poll.log 2>&1
# ---------------------------------------------------------------------------
# Proactive task trigger — nudge lobsters to scan their task boards (daily 09:00 UTC)
# ---------------------------------------------------------------------------
0 9 * * * cd ~/workspace && bash scripts/proactive-cron.sh >> /tmp/corellis-cron-proactive.log 2>&1
# ---------------------------------------------------------------------------
# Backup — snapshot critical state files (daily 04:00 UTC)
# ---------------------------------------------------------------------------
0 4 * * * tar czf /tmp/corellis-backup-$(date +\%Y\%m\%d).tar.gz ~/workspace/state/ ~/workspace/company-config/ >> /tmp/corellis-cron-backup.log 2>&1
# ---------------------------------------------------------------------------
# Cron audit — weekly self-check of cron job health (Monday 08:00 UTC)
# Scans logs for errors and generates a summary report.
# ---------------------------------------------------------------------------
0 8 * * 1 cd ~/workspace && bash scripts/cron-audit.sh >> /tmp/corellis-cron-audit.log 2>&1
# ---------------------------------------------------------------------------
# Log rotation — clean up old cron logs (weekly, Sunday 03:00 UTC)
# ---------------------------------------------------------------------------
0 3 * * 0 find /tmp -name "corellis-cron-*.log" -mtime +7 -delete 2>/dev/null