mcp-cron 0.3.0 → 0.5.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 +15 -8
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Model Context Protocol (MCP) server for scheduling and managing tasks through a
|
|
|
9
9
|
- [Manage tasks](#available-mcp-tools) via MCP protocol
|
|
10
10
|
- Task execution with command output capture
|
|
11
11
|
- Task persistence across restarts (SQLite)
|
|
12
|
-
- Multi-instance safe — multiple instances can share the same database without duplicate execution
|
|
12
|
+
- Multi-instance safe — multiple instances can share the same database without duplicate execution. If you need isolated instances instead, use a different `--db-path` for each.
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
@@ -237,15 +237,16 @@ When running with stdio transport, logs are redirected to a `mcp-cron.log` log f
|
|
|
237
237
|
|
|
238
238
|
The server exposes several tools through the MCP protocol:
|
|
239
239
|
|
|
240
|
-
1. `list_tasks` - Lists all scheduled
|
|
240
|
+
1. `list_tasks` - Lists all tasks (scheduled and on-demand)
|
|
241
241
|
2. `get_task` - Gets a specific task by ID
|
|
242
|
-
3. `add_task` - Adds a new
|
|
243
|
-
4. `add_ai_task` - Adds a new
|
|
242
|
+
3. `add_task` - Adds a new shell command task (provide `schedule` for recurring, or omit for on-demand)
|
|
243
|
+
4. `add_ai_task` - Adds a new AI (LLM) task with a prompt (provide `schedule` for recurring, or omit for on-demand)
|
|
244
244
|
5. `update_task` - Updates an existing task
|
|
245
245
|
6. `remove_task` - Removes a task by ID
|
|
246
|
-
7. `
|
|
247
|
-
8. `
|
|
248
|
-
9. `
|
|
246
|
+
7. `run_task` - Immediately executes a task by ID (for on-demand tasks or ad-hoc runs of scheduled tasks)
|
|
247
|
+
8. `enable_task` - Enables a task so it runs on its schedule or can be triggered via `run_task`
|
|
248
|
+
9. `disable_task` - Disables a task so it stops running and cannot be triggered
|
|
249
|
+
10. `get_task_result` - Gets execution results for a task (latest by default, or recent history with `limit`)
|
|
249
250
|
|
|
250
251
|
### Task Format
|
|
251
252
|
|
|
@@ -273,6 +274,12 @@ For shell command tasks, use the `command` field to specify the command to execu
|
|
|
273
274
|
For AI tasks, use the `prompt` field to specify what the AI should do.
|
|
274
275
|
The `type` field can be either `shell_command` (default) or `AI`.
|
|
275
276
|
|
|
277
|
+
**Scheduled vs on-demand tasks:**
|
|
278
|
+
- **Scheduled**: Provide a `schedule` (cron expression) — the task runs automatically on that schedule.
|
|
279
|
+
- **On-demand**: Omit `schedule` — the task sits idle until triggered via `run_task`.
|
|
280
|
+
|
|
281
|
+
`run_task` also works on scheduled tasks for ad-hoc execution outside their normal schedule. After execution, scheduled tasks resume their normal schedule; on-demand tasks return to idle.
|
|
282
|
+
|
|
276
283
|
### Task Status
|
|
277
284
|
|
|
278
285
|
The tasks can have the following status values:
|
|
@@ -284,7 +291,7 @@ The tasks can have the following status values:
|
|
|
284
291
|
|
|
285
292
|
### Cron Expression Format
|
|
286
293
|
|
|
287
|
-
The scheduler uses the [github.com/robfig/cron/v3](https://github.com/robfig/cron) library for parsing
|
|
294
|
+
Cron expressions are required for scheduled tasks and omitted for on-demand tasks. The scheduler uses the [github.com/robfig/cron/v3](https://github.com/robfig/cron) library for parsing. The format includes seconds:
|
|
288
295
|
|
|
289
296
|
```
|
|
290
297
|
┌───────────── second (0 - 59) (Optional)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-cron",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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.5.0",
|
|
15
|
+
"mcp-cron-darwin-arm64": "0.5.0",
|
|
16
|
+
"mcp-cron-linux-amd64": "0.5.0",
|
|
17
|
+
"mcp-cron-linux-arm64": "0.5.0",
|
|
18
|
+
"mcp-cron-windows-amd64": "0.5.0",
|
|
19
|
+
"mcp-cron-windows-arm64": "0.5.0"
|
|
20
20
|
}
|
|
21
21
|
}
|