T06 · System Persistence
- Location
SKILL.md:115- Finding
Cross-Session Persistence Through Scheduled Task and Service Registration
- Content
View full analysis
> /home/user/.openclaw/workspace/logs/claws-dream.log 2>&1 ``` ```powershell $action = New-ScheduledTaskAction -Execute 'bash' -Argument '-c "bash /home/you/.openclaw/workspace/skills/claws-dream/scripts/dream.sh"' $trigger = New-ScheduledTaskTrigger -Daily -At 3am Register-ScheduledTask -TaskName 'claws-dream' -Action $action -Trigger $trigger -RunLevel Limited ``` The persisted entrypoint subsequently executes a fixed OpenClaw cron job: ```bash # Trigger via openclaw cron run (more reliable than sending message) openclaw cron run 9426984b-de79-4ebd-b798-869eb9dc0a3f >> "$DREAM_LOG" 2>&1 || { echo "Cron run failed with exit code $?" >> "$DREAM_LOG" exit 1 } ``` ### Technical Analysis The installation documentation instructs users to register execution through macOS launchd, a system-wide Linux systemd timer, cron, or Windows Task Scheduler. These mechanisms survive the current Skill invocation and execute the Skill entrypoint automatically every day. Scheduled operation is related to the declared nightly-consolidation functionality and is openly documented. However, the Linux systemd instructions require administrative access to create units under `/etc/systemd/system` and enable them through `sudo`. A user-scoped systemd timer would be sufficient because the service itself is configur ...[truncated 2353 chars]- Remediation
View remediation
