mcp-cron 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -10
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -242,13 +242,14 @@ The server exposes several tools through the MCP protocol:
|
|
|
242
242
|
2. `get_task` - Gets a specific task by ID
|
|
243
243
|
3. `add_task` - Adds a new shell command task (provide `schedule` for recurring, or omit for on-demand)
|
|
244
244
|
4. `add_ai_task` - Adds a new AI (LLM) task with a prompt (provide `schedule` for recurring, or omit for on-demand)
|
|
245
|
-
5. `
|
|
246
|
-
6. `
|
|
247
|
-
7. `
|
|
248
|
-
8. `
|
|
249
|
-
9. `
|
|
250
|
-
10. `
|
|
251
|
-
11. `
|
|
245
|
+
5. `add_http_task` - Adds a new HTTP (webhook) task that issues an HTTP request to a `url` (provide `schedule` for recurring, or omit for on-demand)
|
|
246
|
+
6. `update_task` - Updates an existing task
|
|
247
|
+
7. `remove_task` - Removes a task by ID
|
|
248
|
+
8. `run_task` - Executes a task by ID, waits for completion, and returns the result (for on-demand tasks or ad-hoc runs of scheduled tasks)
|
|
249
|
+
9. `enable_task` - Enables a task so it runs on its schedule or can be triggered via `run_task`
|
|
250
|
+
10. `disable_task` - Disables a task so it stops running and cannot be triggered
|
|
251
|
+
11. `get_task_result` - Gets execution results for a task (latest by default, or recent history with `limit`)
|
|
252
|
+
12. `query_task_result` - Runs a read-only SQL query against the database (SELECT only, capped at 1000 rows)
|
|
252
253
|
|
|
253
254
|
### Task Format
|
|
254
255
|
|
|
@@ -272,9 +273,23 @@ Tasks have the following structure:
|
|
|
272
273
|
}
|
|
273
274
|
```
|
|
274
275
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
The `type` field can be `shell_command` (default), `AI`, or `http`. The fields that apply depend on the type:
|
|
277
|
+
|
|
278
|
+
- **`shell_command`** — `command`: the shell command to execute.
|
|
279
|
+
- **`AI`** — `prompt`: what the AI should do.
|
|
280
|
+
- **`http`** — `url` (required), `method` (defaults to `POST`), `headers` (JSON object of string→string), and `body` (request body string). Created via `add_http_task`.
|
|
281
|
+
|
|
282
|
+
For HTTP tasks, the result row reuses the existing columns:
|
|
283
|
+
|
|
284
|
+
| Result field | Meaning for HTTP tasks |
|
|
285
|
+
|---|---|
|
|
286
|
+
| `exit_code` | HTTP status code (0 if no response was received) |
|
|
287
|
+
| `output` | Response body preview (capped at 8 KiB, suffixed `... (truncated)`) |
|
|
288
|
+
| `error` | Transport error, build-request error, or `non-2xx status: N <reason>` |
|
|
289
|
+
| `duration` | Round-trip latency |
|
|
290
|
+
| `url` | The request URL |
|
|
291
|
+
|
|
292
|
+
This keeps `query_task_result` queries uniform — e.g. `SELECT COUNT(*) FROM results WHERE task_id='x' AND exit_code >= 200 AND exit_code < 300` counts successful HTTP calls.
|
|
278
293
|
|
|
279
294
|
**Scheduled vs on-demand tasks:**
|
|
280
295
|
- **Scheduled**: Provide a `schedule` (cron expression) — the task runs automatically on that schedule.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-cron",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "MCP server for cron task scheduling (shell commands and AI prompts)",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"bin": {
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"url": "git+https://github.com/jolks/mcp-cron.git"
|
|
12
12
|
},
|
|
13
13
|
"optionalDependencies": {
|
|
14
|
-
"mcp-cron-darwin-amd64": "0.
|
|
15
|
-
"mcp-cron-darwin-arm64": "0.
|
|
16
|
-
"mcp-cron-linux-amd64": "0.
|
|
17
|
-
"mcp-cron-linux-arm64": "0.
|
|
18
|
-
"mcp-cron-windows-amd64": "0.
|
|
19
|
-
"mcp-cron-windows-arm64": "0.
|
|
14
|
+
"mcp-cron-darwin-amd64": "0.9.0",
|
|
15
|
+
"mcp-cron-darwin-arm64": "0.9.0",
|
|
16
|
+
"mcp-cron-linux-amd64": "0.9.0",
|
|
17
|
+
"mcp-cron-linux-arm64": "0.9.0",
|
|
18
|
+
"mcp-cron-windows-amd64": "0.9.0",
|
|
19
|
+
"mcp-cron-windows-arm64": "0.9.0"
|
|
20
20
|
}
|
|
21
21
|
}
|