返回顶部
a

auto-updater-pro自动更新增强版

Enhanced auto-updater with detailed logging, missed run recovery, and Gateway restart protection.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.0
安全检测
已通过
563
下载量
免费
免费
2
收藏
概述
安装方式
版本历史

auto-updater-pro

Auto-Updater Pro

Enhanced auto-updater with detailed logging, missed run recovery, and Gateway restart protection.

Version: 1.1.0 (Updated 2026-02-22)

What's New:

  • - ✅ Detailed logging at each step (prevents state loss on restart)
  • ✅ Missed run recovery (auto-runs if Gateway was offline)
  • ✅ 30-second delay after updates (prevents interruption)
  • ✅ Email report support (less intrusive than chat messages)
  • ✅ Better error handling and retry logic

Note: This is an enhanced version of the original auto-updater skill with production-ready features.



What It Does

This skill sets up a daily cron job that:

  1. 1. Updates Clawdbot itself (via clawdbot doctor or package manager)
  2. Updates all installed skills (via clawdhub update --all)
  3. Messages you with a summary of what was updated
  4. New: Logs every step to prevent state loss on Gateway restart
  5. New: Auto-recovers if the scheduled time was missed

Setup

Quick Start

Ask Clawdbot to set up the auto-updater:

CODEBLOCK0

Or manually add the cron job:

CODEBLOCK1

Recommended Configuration (v1.1.0+)

For production use, add these settings to your cron job:

CODEBLOCK2

Key Settings:

  • - missedRunPolicy: "run-immediately" - Auto-runs if Gateway was offline at scheduled time
  • INLINECODE4 - Allow 10 minutes for updates to complete
  • INLINECODE5 - Set to your timezone



Configuration Options


OptionDefaultDescription
Time4:00 AMWhen to run updates (use --cron to change)
Timezone
System default | Set with --tz |
| Delivery | Main session | Where to send the update summary |
| Timeout | 300s | Recommended: 600s for npm updates |
| Missed Run | None | Recommended: run-immediately |


How Updates Work

Clawdbot Updates

For npm/pnpm/bun installs:
CODEBLOCK3

For source installs (git checkout):
CODEBLOCK4

Always run clawdbot doctor after updating to apply migrations.

Skill Updates

CODEBLOCK5

This checks all installed skills against the registry and updates any with new versions available.



Update Summary Format

After updates complete, you'll receive a message like:

CODEBLOCK6



Detailed Logging (v1.1.0+)

To prevent state loss during Gateway restarts, the update process logs every step:

Log File Location

CODEBLOCK7

Log Format

CODEBLOCK8

Six-Phase Update Process

Phase 1: Preparation

  • - Record start time
  • Check current version
  • Write to log file immediately

Phase 2: Check for Updates

  • - Check latest version (npm view)
  • Append to log file
  • Compare versions

Phase 3: Execute Update

  • - Record update start
  • Run openclaw update run or INLINECODE11
  • Immediately log completion
  • Verify new version

Phase 4: Persist State

  • - Append full results to log
  • Wait 3 seconds for disk sync

Phase 5: Send Report

  • - Send email/chat report
  • Log delivery status

Phase 6: Delay Restart (Critical!)

  • - Wait 30 seconds before any Gateway restart
  • Ensures npm processes complete
  • Prevents state loss



Manual Commands

Check for updates without applying:
CODEBLOCK9

View current skill versions:
CODEBLOCK10

Check Clawdbot version:

clawdbot --version



Troubleshooting

Updates Not Running

  1. 1. Verify cron is enabled: check cron.enabled in config
  2. Confirm Gateway is running continuously
  3. Check cron job exists: INLINECODE13
  4. Check if missed run policy is set: INLINECODE14

Update Failures

If an update fails, the summary will include the error. Common fixes:

  • - Permission errors: Ensure the Gateway user can write to skill directories
  • Network errors: Check internet connectivity
  • Package conflicts: Run clawdbot doctor to diagnose
  • Gateway restart interruption: Check log file for partial completion

Gateway Restart During Update

If Gateway restarts during update (common with npm installs):

  1. 1. Check log file: INLINECODE16
  2. Verify version: INLINECODE17
  3. Manually send report if needed (log file has all info)

Disabling Auto-Updates

Remove the cron job:
CODEBLOCK12

Or disable temporarily in config:

{
  "cron": {
    "enabled": false
  }
}



Best Practices

1. Schedule During Low Activity

Choose a time when you're unlikely to be using the system:
CODEBLOCK14

2. Enable Missed Run Recovery

Prevents missing updates if Gateway is offline:
CODEBLOCK15

3. Use Email for Reports

Less intrusive than chat messages:

  • - Configure email-163-com or similar skill
  • Send plain text reports
  • Include log file path

4. Log Everything

Always write to log file before sending reports:

  • - Prevents state loss
  • Enables debugging
  • Provides audit trail

5. Wait After Updates

Add 30-second delay before any Gateway restart:

sleep 30



Resources


Version History

v1.1.0 (2026-02-22)

Improvements:

  • - ✅ Added detailed logging at each step
  • ✅ Added missed run recovery policy
  • ✅ Added 30-second delay after updates
  • ✅ Added email report support
  • ✅ Improved error handling

Bug Fixes:

  • - 🐛 Fixed state loss on Gateway restart
  • 🐛 Fixed missed scheduled runs
  • 🐛 Fixed report delivery failures

v1.0.0 (2026-01-13)

  • - ✅ Initial release
  • ✅ Basic daily update check
  • ✅ Simple report format

Published: 2026-02-22 Maintainer: OpenClaw Team License: MIT

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 auto-updater-pro-1776419952 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 auto-updater-pro-1776419952 技能

通过命令行安装

skillhub install auto-updater-pro-1776419952

下载

⬇ 下载 auto-updater-pro v1.1.0(免费)

文件大小: 6.89 KB | 发布时间: 2026-4-17 19:02

v1.1.0 最新 2026-4-17 19:02
Enhanced with detailed logging, missed run recovery, 30s delay after updates, email reports, and better error handling

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部