MCPInstall

cron-ops

Cron job lifecycle: create, update, remove, debug, fix false positives, sanitize payloads

Installs
64
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/alphaonedev/openclaw-graph --skill cron-ops
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads cron-ops automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

cron-ops

Purpose

This skill handles the complete lifecycle of cron jobs in OpenClaw, including creation, updates, removal, debugging, fixing false positives, and sanitizing payloads to ensure secure and reliable automation.

When to Use

Use this skill for scheduling repetitive tasks like backups, data syncs, or alerts in production environments; when troubleshooting cron failures; or to maintain job hygiene in automated workflows. Apply it in scenarios involving system automation, such as server maintenance or API polling.

Key Capabilities

  • Create cron jobs with custom schedules and commands.
  • Update jobs to modify schedules, commands, or parameters.
  • Remove jobs to clean up unused schedules.
  • Debug jobs by logging outputs and inspecting errors.
  • Fix false positives by analyzing execution logs and adjusting filters.
  • Sanitize payloads to prevent injection attacks, ensuring commands are safe.

Usage Patterns

Always authenticate using the $OPENCLAW_API_KEY environment variable. For CLI, prefix commands with openclaw cron. For API, use HTTPS endpoints like https://api.openclaw.com/cron. Start with job creation, then use IDs for updates or deletions. In code, import OpenClaw SDK and handle responses synchronously. Example pattern: Check job status before updating to avoid conflicts.

Common Commands/API

Use the OpenClaw CLI for quick operations or the REST API for programmatic access. Authentication requires setting $OPENCLAW_API_KEY.

  • Create a job (CLI):
    openclaw cron create --schedule "0 0 * * *" --command "echo 'Hello'" --payload '{"key": "value"}'
    This schedules a job to run daily at midnight.

  • Update a job (API):
    curl -X PUT https://api.openclaw.com/cron/jobs/{jobId} -H "Authorization: Bearer $OPENCLAW_API_KEY" -d '{"schedule": "0 30 * * *", "command": "backup.sh"}'
    Updates the schedule of an existing job to run every hour at 30 minutes.

  • Remove a job (CLI):
    openclaw cron delete --job-id 12345 --force
    Deletes the specified job, using --force to bypass confirmation.

  • Debug a job (API):
    curl -X GET https://api.openclaw.com/cron/jobs/{jobId}/logs -H "Authorization: Bearer $OPENCLAW_API_KEY"
    Retrieves logs for debugging; parse JSON output for error details.

  • Fix false positives (CLI):
    openclaw cron fix --job-id 12345 --filter "error_type=timeout"
    Applies fixes by updating filters in the job config to ignore common false positives.

  • Sanitize payloads (code snippet):

    import openclaw
    client = openclaw.Client(api_key=os.environ['OPENCLAW_API_KEY'])
    sanitized_payload = client.sanitize({'command': 'echo "unsafe"; rm -rf /'})
    print(sanitized_payload)  # Outputs a safe version
    

    Use this to clean user-input payloads before job creation.

Config format for jobs is JSON, e.g., {"schedule": "cron_expression", "command": "shell_command", "payload": {"key": "value"}}.

Integration Notes

Integrate with other OpenClaw skills by referencing job IDs in workflows. For example, link to logging skill for enhanced monitoring. Use webhooks by adding a --webhook-url flag in CLI commands, e.g., openclaw cron create --webhook-url "https://your.service/webhook". In multi-service setups, pass $OPENCLAW_API_KEY via environment variables in Docker or CI/CD pipelines. Ensure compatibility by using the latest OpenClaw SDK version (v2.5+). For external systems, map cron schedules to standard formats like Unix crontab.

Error Handling

Common errors include authentication failures (HTTP 401), invalid schedules (HTTP 400), or job conflicts (HTTP 409). Handle by checking response codes: if status is 401, verify $OPENCLAW_API_KEY. For invalid schedules, validate with openclaw cron validate --schedule "invalid". In code, use try-except blocks:

try:
    response = client.create_job(schedule="0 0 * * *")
except openclaw.AuthError as e:
    print("Auth failed: Set $OPENCLAW_API_KEY")
except openclaw.ValidationError as e:
    print(f"Invalid input: {e}")

Retry transient errors with exponential backoff. Log all errors using the job ID for traceability.

Concrete Usage Examples

  1. Create a daily backup job:
    First, set $OPENCLAW_API_KEY. Then run: openclaw cron create --schedule "0 2 * * *" --command "rsync -a /data/ /backup/". Verify with openclaw cron list. This automates daily backups at 2 AM, and you can debug logs if it fails.

  2. Debug and fix a failed cron job:
    Identify the job with openclaw cron list --status failed. Debug: curl -X GET https://api.openclaw.com/cron/jobs/12345/logs -H "Authorization: Bearer $OPENCLAW_API_KEY". If it's a false positive, fix with openclaw cron fix --job-id 12345 --filter "status=timeout". This resolves issues like network timeouts in scheduled tasks.

Graph Relationships

  • Depends on: core-openclaw (for base API)
  • Relates to: scheduling (for advanced timers), automation (for workflow integration)
  • Conflicts with: none
  • Extends: jobs (for general task management)

FAQ

What does the cron-ops skill do?

Cron job lifecycle: create, update, remove, debug, fix false positives, sanitize payloads

How do I install cron-ops?

Run npx skills add https://github.com/alphaonedev/openclaw-graph --skill cron-ops in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/cron-ops/ (personal) or .claude/skills/cron-ops/ (project).

Which AI agents can use cron-ops?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is cron-ops safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains cron-ops?

It is published by alphaonedev in alphaonedev/openclaw-graph. It has 64 recorded installs.

More from alphaonedev/openclaw-graph

View all →

playwright-scraper

alphaonedev/openclaw-graph

Playwright web scraping: dynamic content, auth flows, pagination, data extraction, screenshots

Testing & QA1.6K installs

humanize-ai-text

alphaonedev/openclaw-graph

AI text humanization: reduce AI-detection patterns, natural phrasing, tone adjustment

463 installs

gcp-iam

alphaonedev/openclaw-graph

Manages identity and access control for Google Cloud resources using IAM policies and roles.

DevOps & Cloud431 installs

macos-automation

alphaonedev/openclaw-graph

AppleScript, JXA, Shortcuts, Automator, osascript, System Events, accessibility API

food-order

alphaonedev/openclaw-graph

Food delivery: DoorDash/UberEats/Grubhub ordering, restaurant search, order status tracking

249 installs

tavily-web-search

alphaonedev/openclaw-graph

Open the skill to read its SKILL.md instructions.

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.