Scheduled Tasksのロゴ

Scheduled Tasks

コミュニティ
MagicCube
scheduled-tasks

Manage Agentara scheduled tasks (cronjobs). Use when the user wants to create, list, update, or delete recurring scheduled tasks — triggered by phrases like "add a cronjob", "schedule a task", "remind me to do something after 10 minutes", "list my scheduled tasks", "remove cronjob", "update the schedule", etc.

概要

公開者MagicCube
リポジトリagentara
スキル名scheduled-tasks
スター
516
フォーク
58
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    MagicCubeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルScheduled TasksをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/MagicCube/agentara/tree/main/user-home/.claude/skills/scheduled-tasks
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MagicCube/agentara.git /tmp/agentara
mkdir -p .claude/skills
cp -r /tmp/agentara/user-home/.claude/skills/scheduled-tasks .claude/skills/scheduled-tasks
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでScheduled Tasksを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にScheduled Tasksを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Scheduled Tasksは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Overview

This skill manages Agentara scheduled tasks via the REST API at http://localhost:1984/api/cronjobs.

A scheduled task has two parts:

  • What: an instruction (natural language prompt sent to the agent)
  • When: a schedule object with one of at/delay (one-shot) or pattern/every (recurring), plus optional limit and immediately

session_id: contextual vs independent

  • Independent (default): omit session_id. Each trigger creates a new session — the agent has no memory of previous runs. Suitable for most cronjobs.
  • Contextual: pass a fixed session_id (generate one via python3 -c "import uuid; print(uuid.uuid4())"). All triggers share the same conversation session — the agent can reference previous runs. Use this only when continuity matters (e.g. daily standup that tracks progress over time).

Workflow

Step 1: Understand intent

Ask or infer what the user wants:

IntentAction
"list cronjobs" / "show scheduled tasks"List
"add a cronjob" / "schedule a task every ..."Create
"update cronjob" / "change schedule to ..."Update (upsert by id)
"delete cronjob" / "remove scheduled task"Delete

Step 2: Determine whether session_id is needed

Ask yourself: does this task need to remember context across triggers?

  • "Summarize today's news" → No. Each run is self-contained. Omit session_id.
  • "Check project progress and compare with yesterday" → Yes. The agent needs prior context. Generate a fixed session_id.

If unsure, ask the user: "Should each trigger run independently, or do you need them to share conversation history?"

Step 3: Execute

Use Bash to run curl commands against the API. All examples below use localhost:1984.

IMPORTANT: Never pipe write operations (POST/PUT/DELETE) through jq. If jq fails to parse the response, the curl request has still been sent and executed server-side. Retrying the command will create duplicates or cause unintended side effects. Only use | jq . for read operations (GET). For write operations, output the raw response directly.


API Reference

List all scheduled tasks

bash
curl -s http://localhost:1984/api/cronjobs | jq .

jq is safe here because GET is read-only. Never use | jq . on POST/PUT/DELETE commands.

Create — independent (no session_id)

Most common case. Each trigger starts a fresh session.

Cron pattern (every day at 9 AM):

bash
curl -s -X POST http://localhost:1984/api/cronjobs \
  -H "Content-Type: application/json" \
  -d '{
    "instruction": "Summarize today'\''s top tech news",
    "schedule": { "pattern": "0 9 * * *" }
  }'

Interval (every 30 minutes):

bash
curl -s -X POST http://localhost:1984/api/cronjobs \
  -H "Content-Type: application/json" \
  -d '{
    "instruction": "Check all services are healthy",
    "schedule": { "every": 1800000 }
  }'

Cron + limit (every Friday 6 PM, max 10 times):

bash
curl -s -X POST http://localhost:1984/api/cronjobs \
  -H "Content-Type: application/json" \
  -d '{
    "instruction": "Generate weekly project report",
    "schedule": { "pattern": "0 18 * * 5", "limit": 10 }
  }'

Interval + immediately (every hour, first run right now):

bash
curl -s -X POST http://localhost:1984/api/cronjobs \
  -H "Content-Type: application/json" \
  -d '{
    "instruction": "Sync upstream repository changes",
    "schedule": { "every": 3600000, "immediately": true }
  }'

Delay (one-shot after 10 minutes):

bash
curl -s -X POST http://localhost:1984/api/cronjobs \
  -H "Content-Type: application/json" \
  -d '{
    "instruction": "Remind me to review the report",
    "schedule": { "delay": 600000 }
  }'

All schedule options (cron + interval + limit + immediately):

bash
curl -s -X POST http://localhost:1984/api/cronjobs \
  -H "Content-Type: application/json" \
  -d '{
    "instruction": "Run full regression test suite",
    "schedule": {
      "pattern": "0 2 * * *",
      "every": 86400000,
      "limit": 30,
      "immediately": true
    }
  }'

Create — contextual (with session_id)

First generate a UUID:

bash
SESSION_ID=$(python3 -c "import uuid; print(uuid.uuid4())")

Then pass it. All triggers will share this session's conversation history:

bash
curl -s -X POST http://localhost:1984/api/cronjobs \
  -H "Content-Type: application/json" \
  -d "{
    \"session_id\": \"$SESSION_ID\",
    \"instruction\": \"Check project progress, compare with yesterday, and flag blockers\",
    \"schedule\": { \"pattern\": \"0 9 * * 1-5\" }
  }"

Update a scheduled task

PUT with the scheduler ID in the path. Omit session_id to keep existing; pass null for independent mode or a UUID for contextual.

bash
curl -s -X PUT http://localhost:1984/api/cronjobs/<scheduled-task-id> \
  -H "Content-Type: application/json" \
  -d '{
    "instruction": "Updated instruction here",
    "schedule": { "pattern": "0 8 * * *" }
  }'

Delete a scheduled task

bash
curl -s -X DELETE http://localhost:1984/api/cronjobs/<scheduled-task-id>

Schedule field reference

FieldTypeRequiredDescription
atnumberone of at/delay/pattern/everyEpoch ms for one-shot at a specific time
delaynumberone of at/delay/pattern/everyDelay in ms before one-shot (normalized to at on save)
patternstringone of at/delay/pattern/everyCron expression (e.g. "0 9 * * *")
everynumberone of at/delay/pattern/everyInterval in ms
limitnumbernoMax execution count
immediatelybooleannoRun once immediately on registration

Note: for one-shot, use exactly one of at or delay; no other schedule fields are allowed. delay is normalized to at when stored.


Guided interaction

When the user describes a task in natural language:

  1. Extract the instruction — what the agent should do.
  2. Extract the schedule — map natural language to schedule fields:
    • "Only once at 2026-03-11 09:00:00" → { "at": 1773190800000 }, resolve timestamp by running Python code: import datetime; print(int(datetime.datetime(2026, 3, 11, 9, 0, 0).timestamp() * 1000))
    • "10 minutes later" / "in 10 minutes" → { "delay": 600000 } (600000 ms = 10 min)
    • "every day at 9am" → { "pattern": "0 9 * * *" }
    • "every 30 minutes" → { "every": 1800000 }
    • "only 5 times" → add "limit": 5
    • "start now" / "run immediately" → add "immediately": true
  3. Decide session_id — does the task need cross-trigger context? If yes, generate a UUID. If no (most cases), omit it.
  4. Confirm the mapped parameters with the user before executing.
  5. After execution, show the response (especially the id for future update/delete).

When modifying an existing task, always use Update (PUT) instead of delete + create. This preserves the task ID and is a single operation. Only use delete when the user explicitly wants to remove a task entirely.

When deleting or updating, first list existing tasks so the user can pick which one to modify.

よくある質問

AIスキル「Scheduled Tasks」では何ができますか?

Manage Agentara scheduled tasks (cronjobs). Use when the user wants to create, list, update, or delete recurring scheduled tasks — triggered by phrases like "add a cronjob", "schedule a task", "remind me to do something after 10 minutes", "list my scheduled tasks", "remove cronjob", "update the schedule", etc.

TypingMindでScheduled Tasksを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Scheduled Tasksはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにScheduled Tasksをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/MagicCube/agentara/tree/main/user-home/.claude/skills/scheduled-tasksを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Scheduled Tasksを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Scheduled Tasksは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもScheduled Tasksを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Scheduled Tasks」は無料ですか?

MagicCubeがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇