← 返回 Skills 市场
indigas

Cron Manager

作者 Indigas · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
144
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install cron-manager
功能描述
Manage, schedule, monitor, and report on recurring cron tasks with flexible patterns and handle dependencies, priorities, timezones, and execution logs.
使用说明 (SKILL.md)

CLAW CRON MANAGER

You are a cron-manager skill that handles scheduling, monitoring, and management of recurring tasks for autonomous agents running on OpenClaw.

What You Do

  • Create, schedule, and manage cron tasks with flexible patterns (hourly, daily, weekly, custom intervals)
  • Monitor cron execution, track success/failure rates, and alert on issues
  • Provide task history, statistics, and performance reports
  • Manage task dependencies, priorities, and resource limits
  • Generate cron expressions and human-readable schedules
  • Handle timezones, DST transitions, and scheduling conflicts

What You Don't Do

  • Execute the actual task logic (that's the task's job)
  • Modify system crontabs or system-level scheduling
  • Access external services beyond the OpenClaw API
  • Guarantee execution during system downtime or maintenance windows

Available Commands

Run from the scripts/cron_manager.py script with these actions:

  • cron list [--status all|active|paused|failed] — List all cron tasks
  • cron show \x3Ctask_id> — Show detailed task info and recent runs
  • cron add \x3Cname> --command "\x3Ccmd>" --schedule "\x3Cpattern>" [--timezone UTC] — Add a new task
  • cron remove \x3Ctask_id> — Delete a task
  • cron pause \x3Ctask_id> — Pause execution without deleting
  • cron resume \x3Ctask_id> — Resume a paused task
  • cron run \x3Ctask_id> — Force run a task immediately
  • cron logs \x3Ctask_id> [--count 10] — View recent execution logs
  • cron stats [--hours 168] — Show execution statistics for a period
  • cron health — Overall system health check

Schedule Format

Use standard cron patterns:

  • * * * * * — Every minute
  • */5 * * * * — Every 5 minutes
  • 0 * * * * — Every hour
  • 0 0 * * * — Daily at midnight
  • 0 0 * * 1 — Weekly on Monday
  • 0 0 1 * * — Monthly on 1st
  • @hourly, @daily, @weekly, @monthly, @yearly — Shorthand

Or human-friendly patterns:

  • "every 30 minutes"
  • "daily at 9am"
  • "weekly on Monday at 10am"
  • "every Monday, Wednesday, Friday at 8am"

Example Usage

# Add a daily cleanup task
./cron_manager.py add "cleanup" --command "python cleanup.py" --schedule "@daily"

# Check status of all tasks
./cron_manager.py list --status active

# View logs for a specific task
./cron_manager.py logs "cleanup" --count 5

# Check overall health
./cron_manager.py health

Output Format

All commands return JSON with standardized fields:

{
  "status": "success",
  "data": {
    "tasks": [
      {
        "id": "cleanup",
        "name": "Daily Cleanup",
        "status": "active",
        "schedule": "@daily",
        "next_run": "2026-04-18T00:00:00Z",
        "last_run": "2026-04-17T00:00:01Z",
        "success_rate": 0.98
      }
    ]
  }
}
安全使用建议
This skill is mostly coherent with its description but contains two practical security concerns you should evaluate before installing or using it: 1) Arbitrary shell execution: The script executes task commands via subprocess.run(..., shell=True). That means any task stored in tasks.json can run arbitrary shell commands with the same privileges as the agent. Only add tasks that you fully trust, and do not allow untrusted agents or users to create/modify tasks. Consider sandboxing execution, avoiding shell=True, or using safe execution wrappers. 2) Path traversal / file operations on task IDs: Task IDs are used directly in filenames (logs and removals) without sanitization. A crafted task_id (e.g., containing ../) could cause the script to read, write, or remove files outside the intended data directory if filesystem permissions allow. Validate/sanitize task IDs and consider restricting CRON_DATA_DIR to a locked directory with proper permissions. Other notes: the schedule parsing and next-run calculation are simplistic and have edge-case bugs (could be CPU-heavy for some inputs). Logs and commands are stored in plaintext under the user's home by default — treat the data directory as sensitive. If you proceed, run the skill in a restricted environment, review tasks.json and logs before executing 'run' actions, and consider patching the script to sanitize IDs and avoid shell=True.
功能分析
Type: OpenClaw Skill Name: cron-manager Version: 1.0.0 The skill provides a local task management system that allows for the scheduling and execution of arbitrary shell commands. The primary risk is found in `scripts/cron_manager.py`, which uses `subprocess.run(shell=True)` to execute commands stored in `tasks.json`. While this functionality is consistent with the stated purpose of a cron manager, the lack of command sanitization and the use of a shell environment represent a high-risk capability that could be easily exploited via prompt injection to achieve Remote Code Execution (RCE). No evidence of intentional malice, such as hardcoded backdoors or data exfiltration, was found.
能力评估
Purpose & Capability
Name, description, SKILL.md, and the included script are consistent: a file-based cron manager that stores tasks and logs under a per-skill data directory and exposes CLI actions to list, add, remove, run, etc. The required environment/installation footprint is minimal and matches the stated functionality.
Instruction Scope
SKILL.md instructs operators to run scripts/cron_manager.py and the script implements the described commands. However the runtime instructions (and the script) allow executing arbitrary commands provided in task definitions and reading/writing files in a data directory; SKILL.md's assurances (e.g., 'Do not modify system crontabs') are respected, but the agent will run user-provided shell commands on demand — this is expected for a scheduler but is a sensitive capability and should be handled carefully.
Install Mechanism
Instruction-only skill with no install spec. Nothing is downloaded or written by an installer; the only code is the included script. This is low install risk.
Credentials
No required credentials or config paths are declared. The script optionally respects a CRON_DATA_DIR env var (reasonable). There are no requests for unrelated secrets or external service credentials in the manifest or SKILL.md.
Persistence & Privilege
always is false and the skill does not request elevated or persistent platform privileges. It writes only to a per-skill data directory (by default under the user's home). Autonomous invocation is allowed by default but not unusual; that alone is not flagged.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cron-manager
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cron-manager 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of cron-manager for OpenClaw. - Provides flexible scheduling, monitoring, and management of recurring tasks for autonomous agents. - Supports task creation, scheduling, pause/resume, manual runs, and deletion. - Tracks execution history, success/failure rates, and offers health/stats reporting. - Handles task dependencies, priorities, resource limits, timezones, and DST. - Offers standardized JSON output for all commands and both cron and human-friendly schedule input.
元数据
Slug cron-manager
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Cron Manager 是什么?

Manage, schedule, monitor, and report on recurring cron tasks with flexible patterns and handle dependencies, priorities, timezones, and execution logs. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 144 次。

如何安装 Cron Manager?

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

Cron Manager 是免费的吗?

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

Cron Manager 支持哪些平台?

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

谁开发了 Cron Manager?

由 Indigas(@indigas)开发并维护,当前版本 v1.0.0。

💬 留言讨论