diff --git a/systemd/openclaw-secondbrain-auto-review.timer b/systemd/openclaw-secondbrain-auto-review.timer index da29825..41b4f07 100644 --- a/systemd/openclaw-secondbrain-auto-review.timer +++ b/systemd/openclaw-secondbrain-auto-review.timer @@ -1,9 +1,9 @@ [Unit] -Description=Run auto assign review daily at 14:30 +Description=Run auto assign review every 30 minutes PartOf=openclaw-secondbrain.target [Timer] -OnCalendar=*-*-* 14:30:00 +OnUnitActiveSec=30min Persistent=true [Install] diff --git a/systemd/openclaw-secondbrain-health-check.timer b/systemd/openclaw-secondbrain-health-check.timer index 92e6db0..7610798 100644 --- a/systemd/openclaw-secondbrain-health-check.timer +++ b/systemd/openclaw-secondbrain-health-check.timer @@ -1,9 +1,9 @@ [Unit] -Description=Run health check at 02:00 and 14:00 daily +Description=Run health check every 30 minutes PartOf=openclaw-secondbrain.target [Timer] -OnCalendar=*-*-* 02,14:00:00 +OnUnitActiveSec=30min Persistent=true [Install] diff --git a/systemd/openclaw-secondbrain-import-context-buffer.timer b/systemd/openclaw-secondbrain-import-context-buffer.timer index bbd027a..183a005 100644 --- a/systemd/openclaw-secondbrain-import-context-buffer.timer +++ b/systemd/openclaw-secondbrain-import-context-buffer.timer @@ -1,9 +1,9 @@ [Unit] -Description=Import Context Buffer every 4 hours +Description=Import Context Buffer every 15 minutes PartOf=openclaw-secondbrain.target [Timer] -OnCalendar=*-*-* 02,06,10,14,18,22:00:00 +OnUnitActiveSec=15min Persistent=true [Install] diff --git a/systemd/openclaw-secondbrain-ingest-memory.path b/systemd/openclaw-secondbrain-ingest-memory.path new file mode 100644 index 0000000..5679b37 --- /dev/null +++ b/systemd/openclaw-secondbrain-ingest-memory.path @@ -0,0 +1,10 @@ +[Unit] +Description=Watch memory/ directory for changes to trigger ingest +PartOf=openclaw-secondbrain.target + +[Path] +PathModified=/root/.openclaw/workspace/memory +DirectoryNotEmpty=true + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/systemd/openclaw-secondbrain-ingest-memory.service b/systemd/openclaw-secondbrain-ingest-memory.service index ef5480a..956dfbf 100644 --- a/systemd/openclaw-secondbrain-ingest-memory.service +++ b/systemd/openclaw-secondbrain-ingest-memory.service @@ -6,3 +6,5 @@ OnFailure=openclaw-secondbrain-notify@%n.service Type=oneshot WorkingDirectory=/root/.openclaw/workspace ExecStart=/bin/bash -lc 'flock -n /tmp/%n.lock /usr/bin/python3 /root/.openclaw/workspace/openclaw_cron_wrapper.py ingest_memory' +# Trigger auto-review after each ingest +ExecStartPost=/bin/systemctl start openclaw-secondbrain-auto-review.service