# Cron Task Creator

Create, manage, and run scheduled automated tasks (cron jobs) in Clacky.

- Repository: https://github.com/clacky-ai/openclacky (1209 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add clacky-ai/openclacky --skill cron-task-creator -g -a claude-code -y`
Codex: `npx skills add clacky-ai/openclacky --skill cron-task-creator -g -a codex -y`
Cursor: `npx skills add clacky-ai/openclacky --skill cron-task-creator -g -a cursor -y`
Gemini CLI: `npx skills add clacky-ai/openclacky --skill cron-task-creator -g -a gemini-cli -y`

## Description

Create, manage, and run scheduled automated tasks (cron jobs) in Clacky. Use this skill whenever the user wants to create a new automated task or cron job, set up recurring automation, schedule something to run daily/weekly/hourly, view all scheduled tasks, edit an existing task prompt or cron schedule, enable or disable a task, delete a task, check task run history or logs, or run a task immediately via the WebUI. Trigger on phrases like cron, scheduled task, run every day, automate this; 定时任务, 每天自动, 定时执行.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Cron Task Creator

A skill for creating, managing, and running scheduled automated tasks in Clacky.

## Architecture Overview

```
Storage:
  ~/.clacky/tasks/<name>.md      # Task prompt file (self-contained AI instruction)
  ~/.clacky/schedules.yml        # All scheduled plans (YAML list)
  ~/.clacky/logger/clacky-*.log  # Execution logs (daily rotation)

API Base: http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}

Cron-Tasks API (unified, manages task file + schedule together):
  GET    /api/cron-tasks              → list all cron tasks with schedule info
  POST   /api/cron-tasks              → create task + schedule {name, content, cron, enabled?}
  PATCH  /api/cron-tasks/:name        → update {content?, cron?, enabled?}
  DELETE /api/cron-tasks/:name        → delete task file + schedule
  POST   /api/cron-tasks/:name/run    → execute immediately (creates a new session)
```

## Cron Expression Quick Reference

| Expression       | Meaning                    |
|-----------------|---------------------------|
| `0 9 * * 1-5`  | Weekdays at 09:00         |
| `0 9 * * *`    | Every day at 09:00        |
| `0 */2 * * *`  | Every 2 hours             |
| `*/30 * * * *` | Every 30 minutes          |
| `0 19 * * *`   | Every day at 19:00        |
| `0 8 * * 1`    | Every Monday at 08:00     |
| `0 0 1 * *`    | First day of every month  |

Field order: `minute hour day-of-month month day-of-week`

---

## Operations

### 1. LIST, Show all tasks

```bash
curl -s http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/cron-tasks
```

Display each task: name, cron schedule, enabled status, content preview.

If no tasks exist, inform the user and offer to create one or show templates.

**Key tip**: Remind the user that the Clacky WebUI Task Panel (sidebar → Tasks) also shows all tasks and supports direct management.

---

### 2. CREATE, New task

The rest: https://github.com/clacky-ai/openclacky/blob/HEAD/lib/clacky/default_skills/cron-task-creator/SKILL.md
