mcp-cron 0.1.2 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +52 -2
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -35,6 +35,32 @@ claude mcp add mcp-cron -- npx -y mcp-cron
35
35
  }
36
36
  ```
37
37
 
38
+ #### Recommended Configuration
39
+
40
+ A more complete setup with AI provider, model selection, and sleep prevention:
41
+
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "mcp-cron": {
46
+ "command": "npx",
47
+ "args": [
48
+ "-y", "mcp-cron",
49
+ "--transport", "stdio",
50
+ "--prevent-sleep",
51
+ "--ai-provider", "anthropic",
52
+ "--ai-model", "claude-sonnet-4-5-20250929"
53
+ ],
54
+ "env": {
55
+ "ANTHROPIC_API_KEY": "your-api-key"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ > See [Command Line Arguments](#command-line-arguments) and [Environment Variables](#environment-variables) for all available options.
63
+
38
64
  ### Building from Source
39
65
 
40
66
  #### Prerequisites
@@ -120,6 +146,7 @@ The following command line arguments are supported:
120
146
  | `--ai-max-iterations` | Maximum iterations for tool-enabled AI tasks | `20` |
121
147
  | `--mcp-config-path` | Path to MCP configuration file | `~/.cursor/mcp.json` |
122
148
  | `--db-path` | Path to SQLite database for result history | `~/.mcp-cron/results.db` |
149
+ | `--prevent-sleep` | Prevent system from sleeping while mcp-cron is running (macOS and Windows) | `false` |
123
150
 
124
151
  ### Environment Variables
125
152
 
@@ -131,7 +158,7 @@ The following environment variables are supported:
131
158
  | `MCP_CRON_SERVER_PORT` | The port to bind the server to | `8080` |
132
159
  | `MCP_CRON_SERVER_TRANSPORT` | Transport mode: `sse` or `stdio` | `sse` |
133
160
  | `MCP_CRON_SERVER_NAME` | Server name | `mcp-cron` |
134
- | `MCP_CRON_SERVER_VERSION` | Server version | `0.1.0` |
161
+ | `MCP_CRON_SERVER_VERSION` | Server version | `dev` |
135
162
  | `MCP_CRON_SCHEDULER_DEFAULT_TIMEOUT` | Default timeout for task execution | `10m` |
136
163
  | `MCP_CRON_LOGGING_LEVEL` | Logging level: `debug`, `info`, `warn`, `error`, `fatal` | `info` |
137
164
  | `MCP_CRON_LOGGING_FILE` | Log file path | stdout |
@@ -145,6 +172,28 @@ The following environment variables are supported:
145
172
  | `MCP_CRON_AI_MAX_TOOL_ITERATIONS` | Maximum iterations for tool-enabled tasks | `20` |
146
173
  | `MCP_CRON_MCP_CONFIG_FILE_PATH` | Path to MCP configuration file | `~/.cursor/mcp.json` |
147
174
  | `MCP_CRON_STORE_DB_PATH` | Path to SQLite database for result history | `~/.mcp-cron/results.db` |
175
+ | `MCP_CRON_PREVENT_SLEEP` | Prevent system from sleeping while mcp-cron is running (macOS and Windows) | `false` |
176
+
177
+ ### Sleep Prevention
178
+
179
+ On laptops, the system may go to sleep and prevent scheduled tasks from running on time. Use the `--prevent-sleep` flag to keep the system awake while mcp-cron is running:
180
+
181
+ ```bash
182
+ mcp-cron --prevent-sleep --transport stdio
183
+ ```
184
+
185
+ Or via environment variable:
186
+ ```bash
187
+ MCP_CRON_PREVENT_SLEEP=true mcp-cron --transport stdio
188
+ ```
189
+
190
+ | Platform | Mechanism | Notes |
191
+ |----------|-----------|-------|
192
+ | macOS | `caffeinate` | Prevents idle sleep; automatically cleans up on exit |
193
+ | Windows | `SetThreadExecutionState` | Prevents idle sleep; automatically cleans up on exit |
194
+ | Linux | Not supported | Linux servers typically do not auto-sleep |
195
+
196
+ > **Note:** This prevents idle sleep only. It does not prevent sleep from closing the laptop lid or pressing the power button.
148
197
 
149
198
  ### Logging
150
199
 
@@ -243,8 +292,9 @@ mcp-cron/
243
292
  │ ├── model/ # Data models and types
244
293
  │ ├── scheduler/ # Task scheduling
245
294
  │ ├── server/ # MCP server implementation
295
+ │ ├── sleep/ # Platform-specific system sleep prevention
246
296
  │ ├── store/ # SQLite store (persistent task definitions + result history)
247
- │ └── utils/ # Miscellanous utilities
297
+ │ └── utils/ # Miscellaneous utilities
248
298
  ├── npm/ # npm packages (main + platform-specific binaries)
249
299
  ├── scripts/ # Build and publish scripts
250
300
  ├── go.mod # Go modules definition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-cron",
3
- "version": "0.1.2",
3
+ "version": "0.2.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.1.2",
15
- "mcp-cron-darwin-arm64": "0.1.2",
16
- "mcp-cron-linux-amd64": "0.1.2",
17
- "mcp-cron-linux-arm64": "0.1.2",
18
- "mcp-cron-windows-amd64": "0.1.2",
19
- "mcp-cron-windows-arm64": "0.1.2"
14
+ "mcp-cron-darwin-amd64": "0.2.0",
15
+ "mcp-cron-darwin-arm64": "0.2.0",
16
+ "mcp-cron-linux-amd64": "0.2.0",
17
+ "mcp-cron-linux-arm64": "0.2.0",
18
+ "mcp-cron-windows-amd64": "0.2.0",
19
+ "mcp-cron-windows-arm64": "0.2.0"
20
20
  }
21
21
  }