Scheduled task

From Kxiandaoyan/Memoh-v2 · View interactive version

Scheduled task is an AI agent skill from the GitHub repository Kxiandaoyan/Memoh-v2. Create scheduled tasks for recurring or one-time automated execution. Use when users want to set up tasks that run automatically at specified times (daily, weekly, monthly, cron, or one-time).

How to use this skill

Skill file

Scheduled Task Skill

Usage Scenarios

Use this skill when users want to:

Creating Scheduled Tasks

Step 1: Gather Information

Confirm the following with the user (if not provided):

  1. Task name (required) — Short description
  2. Execution content (required) — The prompt/instructions Claude receives when the task runs
  3. Execution frequency (required) — One-time, daily, weekly, monthly, or custom cron
  4. Working directory (optional) — Defaults to current session working directory
  5. Notification platforms (optional) — Send notifications after task completion

Step 2: Build JSON and Execute API Call

Schedule Types

One-time execution (at):

{ "type": "at", "datetime": "2026-03-15T09:00:00" }

Cron expression (cron) — 5-field format: minute hour day month weekday

{ "type": "cron", "expression": "0 9 * * *" }

Common cron examples:

| Expression | Meaning |

|--------|------|

| 0 9 * * * | Every day at 9:00 AM |

| 0 8 * * 1 | Every Monday at 8:00 AM |

| 0 9 * * 1-5 | Weekdays at 9:00 AM |

| 0 0 1 * * | First day of month at midnight |

| */30 * * * * | Every 30 minutes |

| 0 * * * * | Every hour on the hour |

| 0 9,18 * * * | Every day at 9:00 AM and 6:00 PM |

Create Task via API

Use the backend API to create scheduled tasks. The API endpoint should support the following payload structure:

{
  "name": "Task name",
  "schedule": { "type": "cron", "expression": "0 9 * * *" },
  "prompt": "Detailed instructions Claude will execute when task runs...",
  "workingDirectory": "/path/to/project",
  "description": "Optional detailed description",
  "systemPrompt": "Optional custom system prompt",
  "executionMode": "auto",
  "expiresAt": "2026-12-31",
  "notifyPlatforms": ["dingtalk", "feishu", "telegram", "discord"],
  "enabled": true
}
Field Descriptions

| Field | Required | Description |

|------|------|------|

| name | ✅ | Short task name |

| prompt | ✅ | Instructions Claude receives when task runs (should be clear and complete) |

| schedule | ✅ | Schedule configuration (see types above) |

| workingDirectory | ❌ | Execution directory (defaults to empty) |

| description | ❌ | Detailed description (defaults to empty) |

| systemPrompt | ❌ | Custom system prompt (defaults to empty) |

| executionMode | ❌ | "auto" / "local" / "sandbox" (defaults to "local") |

| expiresAt | ❌ | Expiration date "YYYY-MM-DD" (defaults to null, no expiration) |

| notifyPlatforms | ❌ | Notification platform array: ["dingtalk","feishu","telegram","discord"] (defaults to []) |

| enabled | ❌ | Whether to enable immediately (defaults to true) |

Step 3: Confirm Results

API returns JSON response:

Confirm the following with the user:

Important Notes

```bash

node -e 'const d=new Date();const p=n=>String(n).padStart(2,"0");console.log(${d.getFullYear()}-${p(d.getMonth()+1)}-${p(d.getDate())}T${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())})'

```

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.