feat: add proactive cron tasks and systemd timers\n\n- 10 proactive tasks: ingest with self-healing & link suggestions, daily summary, health check, archive stale, tag normalizer, predictive links, auto assign review, import context buffer\n- systemd timers for scheduling (02:00/14:00 slots, 30min intervals, weekly)\n- all tasks tested and working\n\nRefs: #1

This commit is contained in:
2026-05-31 13:53:51 +02:00
parent a261f5b9e1
commit 0c72e4d9fa
30 changed files with 1361 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Second Brain Archive Stale
PartOf=openclaw-secondbrain.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /root/.openclaw/workspace/second-brain/cron_tasks/archive_stale.py

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Archive stale engrams weekly (Sunday 03:00)
PartOf=openclaw-secondbrain.target
[Timer]
OnCalendar=Sun *-*-* 03:00:00
Persistent=true
[Install]
WantedBy=timers.target

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Second Brain Auto Assign Review
PartOf=openclaw-secondbrain.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /root/.openclaw/workspace/second-brain/cron_tasks/auto_assign_review.py

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Run auto assign review daily at 14:30
PartOf=openclaw-secondbrain.target
[Timer]
OnCalendar=*-*-* 14:30:00
Persistent=true
[Install]
WantedBy=timers.target

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Second Brain Daily Summary
PartOf=openclaw-secondbrain.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /root/.openclaw/workspace/second-brain/cron_tasks/daily_summary.py

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Daily Summary at 14:00
PartOf=openclaw-secondbrain.target
[Timer]
OnCalendar=*-*-* 14:00:00
Persistent=true
[Install]
WantedBy=timers.target

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Second Brain Evaluate Pending Engrams
After=network.target
[Service]
Type=oneshot
ExecStart=/root/.openclaw/workspace/second-brain/.venv/bin/python3 /root/.openclaw/workspace/second-brain/cron_tasks/evaluate_all_pendings.py

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Run Second Brain Evaluate Pending every hour
[Timer]
OnCalendar=hourly
Persistent=true
[Install]
WantedBy=timers.target

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Second Brain Health Check
PartOf=openclaw-secondbrain.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /root/.openclaw/workspace/second-brain/cron_tasks/health_check.py

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Run health check at 02:00 and 14:00 daily
PartOf=openclaw-secondbrain.target
[Timer]
OnCalendar=*-*-* 02,14:00:00
Persistent=true
[Install]
WantedBy=timers.target

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Second Brain Import Context Buffer
PartOf=openclaw-secondbrain.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /root/.openclaw/workspace/second-brain/cron_tasks/import_context_buffer.py

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Import Context Buffer every 4 hours
PartOf=openclaw-secondbrain.target
[Timer]
OnCalendar=*-*-* 02,06,10,14,18,22:00:00
Persistent=true
[Install]
WantedBy=timers.target

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Second Brain Predictive Links
PartOf=openclaw-secondbrain.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /root/.openclaw/workspace/second-brain/cron_tasks/predictive_links.py

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Run predictive links daily at 02:30
PartOf=openclaw-secondbrain.target
[Timer]
OnCalendar=*-*-* 02:30:00
Persistent=true
[Install]
WantedBy=timers.target

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Second Brain Tag Normalizer
PartOf=openclaw-secondbrain.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /root/.openclaw/workspace/second-brain/cron_tasks/tag_normalizer.py

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Tag Normalizer weekly (Sunday 03:15)
PartOf=openclaw-secondbrain.target
[Timer]
OnCalendar=Sun *-*-* 03:15:00
Persistent=true
[Install]
WantedBy=timers.target