| name | cron-task-creator |
| 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; ๅฎๆถไปปๅก, ๆฏๅคฉ่ชๅจ, ๅฎๆถๆง่ก. |
| disable-model-invocation | false |
| user-invocable | true |
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
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
Step 1: Gather required info (only ask for what's missing)
- What should the task DO? (goal, behavior, output format)
- How often should it run? (or is it manual-only without a schedule?)
- Any specific parameters? (URLs, file paths, output location, language)
Step 2: Generate task name
- Rule: only
[a-z0-9_-], lowercase, no spaces
- Examples:
daily_report, price_monitor, weekly_summary
Step 3: Write the task prompt
The prompt must be:
- Self-contained: the agent running it has zero prior context โ include everything needed
- Written as direct instructions to an AI agent (imperative, not conversational)
- Detailed: include URLs, file paths, output format, language, expected output location
Good task prompt example:
You are a price monitoring assistant. Complete the following task:
## Goal
Check the current BTC price on CoinGecko, compare with yesterday's price, and log an alert if the change exceeds 5%.
## Steps
1. Fetch https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd&include_24hr_change=true
2. Parse the JSON response to get current price and 24h change
3. If |change| > 5%, write an alert to ~/price_alerts/alert_YYYY-MM-DD.txt
4. Print the current price and change percentage
Execute immediately.
Step 4: Create via API
curl -s -X POST http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/cron-tasks \
-H "Content-Type: application/json" \
-d '{
"name": "task_name",
"content": "task prompt content...",
"cron": "0 9 * * *",
"enabled": true
}'
Step 5: Confirm creation
โ
Task created successfully!
๐ Task name: daily_standup
โฐ Schedule: Weekdays at 09:00 (cron: 0 9 * * 1-5)
View and manage this task in the Clacky WebUI โ Tasks panel. Click โถ Run to execute immediately.
3. EDIT โ Modify an existing task
Step 1: Identify the task (if unclear, LIST first and ask)
Step 2: Show current state via LIST or ask user to confirm
Step 3: Update via API
curl -s -X PATCH http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/cron-tasks/task_name \
-H "Content-Type: application/json" \
-d '{"content": "new prompt content..."}'
curl -s -X PATCH http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/cron-tasks/task_name \
-H "Content-Type: application/json" \
-d '{"cron": "0 8 * * 1-5"}'
curl -s -X PATCH http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/cron-tasks/task_name \
-H "Content-Type: application/json" \
-d '{"content": "...", "cron": "0 8 * * 1-5"}'
Step 4: Confirm changes
โ
Task updated!
๐ daily_standup
Schedule: 0 9 * * 1-5 โ 0 8 * * 1-5 (now weekdays at 08:00)
4. ENABLE / DISABLE โ Toggle a task
curl -s -X PATCH http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/cron-tasks/task_name \
-H "Content-Type: application/json" \
-d '{"enabled": false}'
curl -s -X PATCH http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/cron-tasks/task_name \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
Confirm:
โ
daily_standup has been disabled.
To re-enable: say "enable daily_standup"
5. DELETE โ Remove a task
Always confirm before deleting (unless the user has explicitly said to delete):
โ ๏ธ Are you sure you want to delete daily_standup? This cannot be undone.
curl -s -X DELETE http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/cron-tasks/task_name
6. HISTORY โ View run history
Read the daily log files directly:
grep "task_name" ~/.clacky/logger/clacky-$(date +%Y-%m-%d).log | tail -20
Or search across recent days:
grep -h "task_name" ~/.clacky/logger/clacky-*.log | tail -30
Display format:
๐ Run History: ai_news_x_daily
Mar 10 19:00 โ Failed โ JSON::ParserError: unexpected end of input
Mar 09 19:00 โ
Success โ took 1m 42s
Mar 08 19:00 โ
Success โ took 2m 10s
7. RUN NOW โ Execute immediately
curl -s -X POST http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/cron-tasks/task_name/run
This creates a new session. Tell the user:
โถ๏ธ Task started in a new session.
View it in the Clacky WebUI โ Sessions panel.
8. TEMPLATES โ Browse common task templates
When user says "what templates are there" or "what can I automate":
๐ Common Task Templates โ pick one to get started:
1. ๐ฐ AI News Digest โ Daily fetch of AI news from X/RSS, generate Markdown report
2. ๐ฐ Price Monitor โ Check crypto/stock prices on a schedule, log alerts on anomalies
3. ๐ Weekly Work Summary โ Every Monday, summarize last week's work into a report
4. ๐ค Weather Reminder โ Fetch weather every morning and save to file
5. ๐ Competitor Monitor โ Periodically scrape competitor sites for changes
6. ๐ Journal Prompt โ Evening reminder to journal with daily reflection questions
7. ๐ Link Health Check โ Periodically verify specified URLs are accessible
8. ๐ File Backup โ Regularly back up a specified directory to another location
Tell me which one interests you, or describe your own use case!
Important Notes
- Task names: only
[a-z0-9_-], no spaces, no uppercase
- Task prompt files must be self-contained โ the executing agent has no prior memory
- Clacky server must be running for cron to trigger automatically (checked every minute)
- The WebUI Task Panel is the preferred interface for managing tasks โ always remind the user to check it after changes