360 Secure SkillHub
360 安全技能中心

Operational Heartbeat

该 Skill 面向 OpenClaw 实例执行每日健康检查:确认当日记忆文件存在并在缺失时创建,读取 cron 任务列表,标记过期或异常任务,最后输出记忆文件状态、任务总数、健康数和过期数的汇总报告。按描述可由 cron 定时无人值守运行。

guillaumemaka
guillaumemaka
热度 24.34
最近更新 2026-05-21 20:03:54
分类:自动化依赖:代码执行 / 读写文件应用场景:工作流 / DevOps / 报告撰写 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add operational-heartbeat
Metadata
name
operational-heartbeat
description
Automated daily health check for OpenClaw instances. Verifies memory file presence, detects stale/overdue cron jobs, and surfaces system status. Intended for scheduled execution via cron.
  1. Ensure memory file exists for today:

    • Path: memory/YYYY-MM-DD.md
    • If missing, create with minimal template
  2. Check cron job health:

    • Use cron list to fetch all jobs
    • For each job, verify state.nextRunAtMs is in the future
    • Flag jobs with consecutiveErrors > 0 or lastRunStatus != 'ok'
    • Count stale/overdue jobs
  3. Optional: promote learnings from recent memory files (if configured)

  4. Report summary:

    • Memory file: created/exists
    • Cron jobs: total, healthy, stale count
    • Any errors or warnings

Implementation notes:

  • Use a small Node.js script to parse cron JSON and filter stale jobs
  • Comparison: new Date().getTime() vs nextRunAtMs
  • Consider timezone-aware scheduling
  • Exit 0 if healthy; non-zero if issues found