← 返回 Skills 市场
xueyetianya

Cronjob

作者 bytesagain4 · GitHub ↗ · v2.0.1 · MIT-0
cross-platform ✓ 安全检测通过
374
总下载
0
收藏
2
当前安装
9
版本数
在 OpenClaw 中安装
/install cronjob
功能描述
Manage cron jobs with execution logging and failure alert tracking. Use when adding tasks, monitoring execution, debugging failed crons.
使用说明 (SKILL.md)

CronJob

A comprehensive sysops toolkit for scanning, monitoring, reporting, and maintaining scheduled job operations. CronJob provides 18+ commands for tracking job events, performing health checks, managing backups, benchmarking performance, and exporting operational data in multiple formats.

Commands

Command Description
cronjob scan \x3Cinput> Record a scan entry — run without args to view recent scan entries
cronjob monitor \x3Cinput> Record a monitoring observation — run without args to view recent entries
cronjob report \x3Cinput> Log a report entry — run without args to view recent reports
cronjob alert \x3Cinput> Record an alert — run without args to view recent alerts
cronjob top \x3Cinput> Log a top-level event — run without args to view recent entries
cronjob usage \x3Cinput> Track usage data — run without args to view recent usage entries
cronjob check \x3Cinput> Record a check result — run without args to view recent checks
cronjob fix \x3Cinput> Log a fix action — run without args to view recent fixes
cronjob cleanup \x3Cinput> Record a cleanup operation — run without args to view recent cleanups
cronjob backup \x3Cinput> Log a backup event — run without args to view recent backups
cronjob restore \x3Cinput> Record a restore operation — run without args to view recent restores
cronjob log \x3Cinput> Add a general log entry — run without args to view recent log entries
cronjob benchmark \x3Cinput> Record a benchmark result — run without args to view recent benchmarks
cronjob compare \x3Cinput> Log a comparison — run without args to view recent comparisons
cronjob stats Display summary statistics across all log categories
cronjob export \x3Cfmt> Export all data to a file (formats: json, csv, txt)
cronjob search \x3Cterm> Search across all log files for a keyword
cronjob recent Show the 20 most recent activity entries from the history log
cronjob status Health check — shows version, data directory, entry count, disk usage
cronjob help Display available commands and usage information
cronjob version Print current version (v2.0.0)

Each data command (scan, monitor, report, etc.) works in two modes:

  • With arguments: Records the input with a timestamp into its dedicated log file
  • Without arguments: Displays the 20 most recent entries from that category

Data Storage

All data is stored locally in plain-text log files:

  • Location: ~/.local/share/cronjob/
  • Format: Each entry is saved as YYYY-MM-DD HH:MM|\x3Cvalue> in per-category .log files
  • History: All operations are additionally logged to history.log with timestamps
  • Export: The export command can generate JSON, CSV, or TXT files from all log data
  • No cloud sync — everything stays on your machine

Requirements

  • Bash 4.0+ (uses set -euo pipefail)
  • Standard Unix utilities: date, wc, du, head, tail, grep, basename, cat
  • No external dependencies, no API keys, no network access required
  • Works on Linux and macOS

When to Use

  1. Cron job monitoring — Track the execution status of scheduled jobs, log failures, and set up alerts for review
  2. Job audit trail — Record scan, check, and report entries to maintain a complete history of job operations
  3. Backup & restore logging — Log backup and restore events with timestamps so you always know what happened and when
  4. Performance benchmarking — Record benchmark results for scheduled tasks and compare them over time to spot regressions
  5. Operational data export — Export all collected logs in JSON, CSV, or TXT format for dashboards, compliance, or further analysis

Examples

# Record a scan of cron job health
cronjob scan "all 12 scheduled jobs ran successfully today"

# Log a monitoring observation
cronjob monitor "backup-job took 45min, 3x longer than usual"

# Record an alert for a failed job
cronjob alert "daily-report cron failed at 03:00 — exit code 1"

# Log a fix action taken
cronjob fix "increased timeout for backup-job from 30m to 90m"

# View summary statistics across all categories
cronjob stats

# Export all data to CSV for spreadsheet analysis
cronjob export csv

# Search for entries related to a specific job
cronjob search "backup-job"

# Quick health check
cronjob status

# View the 20 most recent activity entries
cronjob recent

Configuration

Set CRONJOB_DIR to change the data directory. Default: ~/.local/share/cronjob/


Powered by BytesAgain | bytesagain.com | [email protected]

安全使用建议
This skill appears internally consistent and implements a purely local cron logging tool. Before installing: (1) review and run the included scripts locally (they will create ~/.local/share/cronjob by default); (2) avoid writing secrets into log entries because logs are plain-text and retained locally; (3) if you prefer a different location set CRONJOB_DIR; and (4) only grant execution if you trust the BytesAgain source or after inspecting the script contents yourself. If you need networked alerting, verify or extend the tool explicitly — it currently does not perform any network I/O.
功能分析
Type: OpenClaw Skill Name: cronjob Version: 2.0.1 The CronJob skill is a local logging and activity tracking utility for sysops tasks, storing data exclusively in ~/.local/share/cronjob/. Analysis of scripts/script.sh and SKILL.md reveals no network activity, no access to sensitive system files (like SSH keys or environment variables), and no malicious execution patterns. While the tool's name suggests active cron management, it functions strictly as a manual logging system for recording events like scans, backups, and alerts.
能力评估
Purpose & Capability
Name/description match the provided artifacts: SKILL.md and the included script implement a local cronjob logging/monitoring utility. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
Runtime instructions and the script operate entirely on a local data dir (~/.local/share/cronjob by default). They only read/write files inside that directory and use standard unix utilities. Note: logs are stored in plain text and any sensitive strings you record will be persisted; SKILL.md warns there is no cloud sync.
Install Mechanism
No install spec; the skill is instruction-only with an included Bash script. Nothing is downloaded or installed from remote URLs during install.
Credentials
The skill declares no required environment variables, no credentials, and no config paths. The script respects CRONJOB_DIR override and otherwise uses only HOME to build a per-user data directory — appropriate for this purpose.
Persistence & Privilege
always is false and the skill does not request elevated or cross-skill configuration. It persists only to its own data directory and does not attempt to modify system-wide settings or other skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cronjob
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cronjob 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.1
update
v2.0.0
v2.5 standard: Use-when desc, homepage, source, security fix
v1.0.6
retry-fix-token
v1.0.5
old template -> domain-specific v2.0.0
v1.0.4
Quality upgrade: custom functionality
v1.0.3
De-template, unique content, script cleanup
v1.0.2
Quality fix: cleaner docs, removed flags
v1.0.1
Quality improvement: better docs, examples, cleaner text
v1.0.0
Initial release
元数据
Slug cronjob
版本 2.0.1
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 9
常见问题

Cronjob 是什么?

Manage cron jobs with execution logging and failure alert tracking. Use when adding tasks, monitoring execution, debugging failed crons. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 374 次。

如何安装 Cronjob?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cronjob」即可一键安装,无需额外配置。

Cronjob 是免费的吗?

是的,Cronjob 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cronjob 支持哪些平台?

Cronjob 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cronjob?

由 bytesagain4(@xueyetianya)开发并维护,当前版本 v2.0.1。

💬 留言讨论