@cronicorn/mcp-server 1.7.0 → 1.8.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/dist/docs/core-concepts.md +0 -6
- package/dist/docs/developers/quick-start.md +0 -5
- package/dist/docs/developers/workspace-structure.md +0 -5
- package/dist/docs/introduction.md +34 -50
- package/dist/docs/mcp-server.md +127 -0
- package/dist/docs/quick-start.md +0 -13
- package/dist/docs/technical/configuration-and-constraints.md +0 -6
- package/dist/docs/technical/coordinating-multiple-endpoints.md +0 -6
- package/dist/docs/technical/how-ai-adaptation-works.md +0 -6
- package/dist/docs/technical/how-scheduling-works.md +0 -6
- package/dist/docs/technical/reference.md +0 -8
- package/dist/docs/technical/system-architecture.md +0 -8
- package/dist/docs/use-cases.md +208 -0
- package/package.json +1 -1
- package/dist/docs/mcp-server/troubleshooting.md +0 -82
|
@@ -225,9 +225,3 @@ AI behavior:
|
|
|
225
225
|
- Never exceeds API rate limits (min)
|
|
226
226
|
- Ensures data freshness (max)
|
|
227
227
|
```
|
|
228
|
-
|
|
229
|
-
## Next Steps
|
|
230
|
-
|
|
231
|
-
- **[Introduction](./introduction.md)** - Why use Cronicorn
|
|
232
|
-
- **[Quick Start](./quick-start.md)** - Create your first job
|
|
233
|
-
- **[Technical Documentation](./technical/system-architecture.md)** - For developers and self-hosters
|
|
@@ -172,8 +172,3 @@ Central docs folder that is used by the docs app and mcp-server
|
|
|
172
172
|
| AI prompts | `packages/worker-ai-planner/src/` |
|
|
173
173
|
| HTTP dispatcher | `packages/adapter-http/` |
|
|
174
174
|
| Business logic | `packages/services/` |
|
|
175
|
-
|
|
176
|
-
## Next Steps
|
|
177
|
-
|
|
178
|
-
- **[System Architecture](../technical/system-architecture.md)** - How components interact at runtime
|
|
179
|
-
- **[Quick Start](./quick-start.md)** - Set up your dev environment
|
|
@@ -21,6 +21,40 @@ mcp:
|
|
|
21
21
|
|
|
22
22
|
**Cronicorn** is an intelligent scheduler that automatically adapts to your application's behavior. Set baseline schedules and let AI optimize execution timing based on real-world patterns.
|
|
23
23
|
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 🤖 Recommended: Use the MCP Server
|
|
27
|
+
|
|
28
|
+
**The easiest way to use Cronicorn is through your AI assistant.** Just chat to create jobs, monitor executions, and debug issues—no forms, no clicking.
|
|
29
|
+
|
|
30
|
+
[](https://www.npmjs.com/package/@cronicorn/mcp-server)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install -g @cronicorn/mcp-server
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Configure it with GitHub Copilot, Claude Desktop, or any MCP-compatible AI assistant. Then just talk:
|
|
37
|
+
|
|
38
|
+
- *"Set up a job that checks my API health every 5 minutes"*
|
|
39
|
+
- *"Show me why that endpoint is failing"*
|
|
40
|
+
- *"Migrate my 10 Vercel cron jobs to Cronicorn"*
|
|
41
|
+
|
|
42
|
+
**[→ Learn more about the MCP Server](./mcp-server.md)**
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Quick Navigation
|
|
47
|
+
|
|
48
|
+
**Getting Started**
|
|
49
|
+
- [Quick Start](./quick-start.md) - Create your first scheduled job in 5 minutes
|
|
50
|
+
- [Core Concepts](./core-concepts.md) - Understand jobs, endpoints, and scheduling
|
|
51
|
+
|
|
52
|
+
**Learn More**
|
|
53
|
+
- [Use Cases & Examples](./use-cases.md) - Real-world scenarios across industries
|
|
54
|
+
- [Technical Architecture](./technical/system-architecture.md) - Deep dive - How Cronicorn works behind the scenes
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
24
58
|
## What is Cronicorn?
|
|
25
59
|
|
|
26
60
|
Cronicorn is a scheduling service that combines:
|
|
@@ -89,44 +123,6 @@ When enabled, the AI planner:
|
|
|
89
123
|
- **Multi-tenant isolation**: Secure separation between accounts
|
|
90
124
|
- **API & Web UI**: Manage jobs programmatically or visually
|
|
91
125
|
|
|
92
|
-
## Use Cases
|
|
93
|
-
|
|
94
|
-
### API Health Monitoring
|
|
95
|
-
|
|
96
|
-
Monitor your APIs with adaptive frequency:
|
|
97
|
-
|
|
98
|
-
- Baseline: Check every 5 minutes
|
|
99
|
-
- AI increases to every 30 seconds when errors detected
|
|
100
|
-
- AI backs off to every 15 minutes when stable
|
|
101
|
-
- Stays within your min (30s) and max (15min) constraints
|
|
102
|
-
|
|
103
|
-
### Data Synchronization
|
|
104
|
-
|
|
105
|
-
Sync data between systems efficiently:
|
|
106
|
-
|
|
107
|
-
- Baseline: Sync every hour
|
|
108
|
-
- AI increases during business hours when changes are frequent
|
|
109
|
-
- AI decreases overnight when activity is low
|
|
110
|
-
- Respects API rate limits with max interval constraints
|
|
111
|
-
|
|
112
|
-
### Scheduled Maintenance
|
|
113
|
-
|
|
114
|
-
Run cleanup and maintenance tasks:
|
|
115
|
-
|
|
116
|
-
- Baseline: Daily at 2am via cron expression
|
|
117
|
-
- Pause during known maintenance windows
|
|
118
|
-
- Monitor execution duration trends over time
|
|
119
|
-
- Track success/failure for audit compliance
|
|
120
|
-
|
|
121
|
-
### Webhook Retry Logic
|
|
122
|
-
|
|
123
|
-
Retry failed webhooks intelligently:
|
|
124
|
-
|
|
125
|
-
- Baseline: Immediate retry, then exponential backoff
|
|
126
|
-
- AI adjusts retry timing based on downstream service patterns
|
|
127
|
-
- Automatic pause after sustained failures
|
|
128
|
-
- Resume when downstream recovers
|
|
129
|
-
|
|
130
126
|
## How It Works
|
|
131
127
|
|
|
132
128
|
1. **Create a Job** - Logical container for related endpoints
|
|
@@ -141,15 +137,3 @@ Retry failed webhooks intelligently:
|
|
|
141
137
|
- **E-commerce teams** syncing inventory and order data
|
|
142
138
|
- **DevOps engineers** running scheduled maintenance tasks
|
|
143
139
|
- **Integration developers** managing webhook retries and polling
|
|
144
|
-
|
|
145
|
-
## Getting Started
|
|
146
|
-
|
|
147
|
-
- **Using Cronicorn as a service**: See [Quick Start](./quick-start.md)
|
|
148
|
-
- **Self-hosting Cronicorn**: See [Technical Documentation](./technical/system-architecture.md)
|
|
149
|
-
- **AI assistant integration**: Use our [MCP Server](https://www.npmjs.com/package/@cronicorn/mcp-server)
|
|
150
|
-
|
|
151
|
-
## Next Steps
|
|
152
|
-
|
|
153
|
-
- **[Core Concepts](./core-concepts.md)** - Understand jobs, endpoints, and scheduling
|
|
154
|
-
- **[Quick Start](./quick-start.md)** - Create your first scheduled job
|
|
155
|
-
- **[Technical Deep Dive](./technical/system-architecture.md)** - For developers and self-hosters
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: mcp-server
|
|
3
|
+
title: MCP Server
|
|
4
|
+
description: Control Cronicorn through your AI assistant - no forms, no clicking, just conversation
|
|
5
|
+
tags:
|
|
6
|
+
- getting-started
|
|
7
|
+
- integrations
|
|
8
|
+
- ai
|
|
9
|
+
sidebar_position: 3
|
|
10
|
+
mcp:
|
|
11
|
+
uri: file:///docs/mcp-server.md
|
|
12
|
+
mimeType: text/markdown
|
|
13
|
+
priority: 0.9
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Chat Your Way to Scheduled Jobs
|
|
17
|
+
|
|
18
|
+
[](https://www.npmjs.com/package/@cronicorn/mcp-server)
|
|
19
|
+
|
|
20
|
+
**What if you could manage cron jobs by just talking to your AI assistant?**
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
You: "Set up a job that checks my API health every 5 minutes"
|
|
24
|
+
|
|
25
|
+
AI: *Creates the job, adds the endpoint, configures the schedule*
|
|
26
|
+
✅ Done! Your health check is now running every 5 minutes.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**No forms. No clicking. Just conversation.**
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
### Install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g @cronicorn/mcp-server
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Configure Your AI Assistant
|
|
40
|
+
|
|
41
|
+
Add the Cronicorn MCP server to your AI assistant's configuration. The exact setup varies by tool:
|
|
42
|
+
|
|
43
|
+
- **GitHub Copilot**: Add to VS Code settings
|
|
44
|
+
- **Claude Desktop**: Add to `claude_desktop_config.json`
|
|
45
|
+
- **Cline/Continue/Cursor**: Check your extension's MCP settings
|
|
46
|
+
|
|
47
|
+
See the [full installation guide](https://github.com/weskerllc/cronicorn/tree/main/apps/mcp-server#installation) for platform-specific instructions.
|
|
48
|
+
|
|
49
|
+
### Authenticate
|
|
50
|
+
|
|
51
|
+
First time you use it, you'll authenticate once via OAuth (browser opens, you approve, done). The MCP server remembers you for 30 days.
|
|
52
|
+
|
|
53
|
+
## What You Can Do
|
|
54
|
+
|
|
55
|
+
**Create jobs instantly:**
|
|
56
|
+
```
|
|
57
|
+
"Check https://api.myapp.com/health every 5 minutes"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Debug failures:**
|
|
61
|
+
```
|
|
62
|
+
"My payment-processor job is timing out - fix it"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Monitor everything:**
|
|
66
|
+
```
|
|
67
|
+
"Show me my dashboard stats"
|
|
68
|
+
"What's wrong with that failing endpoint?"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Migrate from other systems:**
|
|
72
|
+
```
|
|
73
|
+
"Help me move my 15 Vercel cron jobs to Cronicorn"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Built-In Guides
|
|
77
|
+
|
|
78
|
+
The MCP server includes interactive slash commands that guide you through common workflows:
|
|
79
|
+
|
|
80
|
+
**`/setup-first-job`** - Perfect for getting started or migrating
|
|
81
|
+
- Learn jobs vs endpoints, baseline schedules, AI adaptation, safety constraints
|
|
82
|
+
- Get step-by-step guidance for your first scheduled task
|
|
83
|
+
|
|
84
|
+
**`/troubleshoot-failures`** - Debug failing endpoints
|
|
85
|
+
- Systematic diagnostic process
|
|
86
|
+
- Common issues and fixes (timeouts, rate limits, auth)
|
|
87
|
+
- Emergency actions when needed
|
|
88
|
+
|
|
89
|
+
## 30+ Tools Available
|
|
90
|
+
|
|
91
|
+
Your AI assistant has access to tools for:
|
|
92
|
+
|
|
93
|
+
- **Job Management** - Create, list, update, pause, resume, delete
|
|
94
|
+
- **Endpoint Control** - Add, configure, update URLs/timeouts/schedules
|
|
95
|
+
- **AI Scheduling** - Apply hints, trigger immediate runs, pause/resume
|
|
96
|
+
- **Monitoring** - Health summaries, execution history, run details, dashboard stats
|
|
97
|
+
|
|
98
|
+
[See all available tools →](https://github.com/weskerllc/cronicorn/tree/main/apps/mcp-server#available-tools)
|
|
99
|
+
|
|
100
|
+
## Example Use Cases
|
|
101
|
+
|
|
102
|
+
**Health monitoring with AI adaptation:**
|
|
103
|
+
```
|
|
104
|
+
"Monitor https://api.acme.com/health every minute.
|
|
105
|
+
Check more frequently if slow, relax to 5 minutes when healthy."
|
|
106
|
+
```
|
|
107
|
+
→ AI auto-adjusts interval based on latency in response
|
|
108
|
+
|
|
109
|
+
**Data sync with queue monitoring:**
|
|
110
|
+
```
|
|
111
|
+
"Sync https://api.acme.com/sync every 5 minutes.
|
|
112
|
+
Speed up when queue_depth > 100, slow down when < 10."
|
|
113
|
+
```
|
|
114
|
+
→ AI monitors queue_depth and adjusts schedule dynamically
|
|
115
|
+
|
|
116
|
+
**Daily cleanup:**
|
|
117
|
+
```
|
|
118
|
+
"Run cleanup at https://api.acme.com/cleanup daily at 2 AM Pacific"
|
|
119
|
+
```
|
|
120
|
+
→ Simple cron-based schedule
|
|
121
|
+
|
|
122
|
+
## Security & Compatibility
|
|
123
|
+
|
|
124
|
+
**Secure authentication** via OAuth 2.0 Device Flow (same as AWS CLI, GitHub CLI). Credentials stored locally with strict permissions. Tokens refresh automatically, re-auth every 30 days.
|
|
125
|
+
|
|
126
|
+
**Works with** GitHub Copilot, Claude Desktop, Cline, Continue, Cursor, and any MCP-compatible AI assistant.
|
|
127
|
+
|
package/dist/docs/quick-start.md
CHANGED
|
@@ -217,16 +217,3 @@ If you're hitting rate limits:
|
|
|
217
217
|
1. Increase **Min Interval** (e.g., from 30s to 60s)
|
|
218
218
|
2. Adjust **Baseline Schedule** to be less frequent
|
|
219
219
|
3. Let AI adapt (it will back off automatically)
|
|
220
|
-
|
|
221
|
-
## Next Steps
|
|
222
|
-
|
|
223
|
-
- **[Core Concepts](./core-concepts.md)** - Understand jobs, endpoints, and AI scheduling
|
|
224
|
-
- **[API Reference](https://cronicorn.com/docs/api)** - Full API documentation
|
|
225
|
-
- **[Self-Hosting Guide](./technical/system-architecture.md)** - Deploy Cronicorn yourself
|
|
226
|
-
|
|
227
|
-
## Getting Help
|
|
228
|
-
|
|
229
|
-
- 📖 [Documentation](https://cronicorn.com/docs)
|
|
230
|
-
- 💬 [Discord Community](https://discord.gg/cronicorn)
|
|
231
|
-
- 📧 [Email Support](mailto:support@cronicorn.com)
|
|
232
|
-
- 🐛 [Report Issues](https://github.com/weskerllc/cronicorn/issues)
|
|
@@ -407,9 +407,3 @@ Expensive operation runs every 10 minutes normally, AI can relax to hourly or ti
|
|
|
407
407
|
7. **Min/max apply relative to `now`, not `lastRunAt`**
|
|
408
408
|
|
|
409
409
|
Configure conservatively. The system is designed to be safe by default. Add constraints when you encounter real problems, not anticipated ones.
|
|
410
|
-
|
|
411
|
-
## Next Steps
|
|
412
|
-
|
|
413
|
-
- **[How Scheduling Works](./how-scheduling-works.md)** - Understand how Governor applies constraints
|
|
414
|
-
- **[How AI Adaptation Works](./how-ai-adaptation-works.md)** - Learn how AI proposes intervals
|
|
415
|
-
- **[Reference](./reference.md)** - Quick lookup for defaults and field ranges
|
|
@@ -449,9 +449,3 @@ When coordination isn't working:
|
|
|
449
449
|
7. **Cross-job coordination**: Embed external status checks in responses
|
|
450
450
|
|
|
451
451
|
These patterns give you the building blocks for complex workflows. Mix and match based on your needs.
|
|
452
|
-
|
|
453
|
-
## Next Steps
|
|
454
|
-
|
|
455
|
-
- **[Configuration and Constraints](./configuration-and-constraints.md)** - Set up endpoints for optimal coordination
|
|
456
|
-
- **[How AI Adaptation Works](./how-ai-adaptation-works.md)** - Understand how AI reads and acts on signals
|
|
457
|
-
- **[Reference](./reference.md)** - Quick lookup for tools and response body patterns
|
|
@@ -445,9 +445,3 @@ This ensures that even if AI becomes unavailable or too expensive, your jobs kee
|
|
|
445
445
|
9. **Quota controls costs**: AI unavailable ≠ jobs stop running
|
|
446
446
|
|
|
447
447
|
Understanding how AI adaptation works helps you design endpoints that benefit from intelligent scheduling, structure response bodies effectively, and debug unexpected schedule changes.
|
|
448
|
-
|
|
449
|
-
## Next Steps
|
|
450
|
-
|
|
451
|
-
- **[Coordinating Multiple Endpoints](./coordinating-multiple-endpoints.md)** - Use AI to orchestrate workflows
|
|
452
|
-
- **[Configuration and Constraints](./configuration-and-constraints.md)** - Set up endpoints for optimal AI behavior
|
|
453
|
-
- **[Reference](./reference.md)** - Quick lookup for tools, fields, and defaults
|
|
@@ -260,9 +260,3 @@ This is the power of database-mediated communication: the Scheduler and AI Plann
|
|
|
260
260
|
6. **Sources provide auditability**: Every decision is traceable
|
|
261
261
|
|
|
262
262
|
Understanding how scheduling works gives you the foundation to configure endpoints effectively, debug unexpected behavior, and reason about how AI adaptation affects execution timing.
|
|
263
|
-
|
|
264
|
-
## Next Steps
|
|
265
|
-
|
|
266
|
-
- **[How AI Adaptation Works](./how-ai-adaptation-works.md)** - Learn how the AI Planner writes hints
|
|
267
|
-
- **[Configuration and Constraints](./configuration-and-constraints.md)** - Guide to setting up endpoints safely
|
|
268
|
-
- **[Reference](./reference.md)** - Quick lookup for fields, defaults, and sources
|
|
@@ -394,11 +394,3 @@ Calculate current backoff multiplier:
|
|
|
394
394
|
```
|
|
395
395
|
failureCount > 0 ? 2^min(failureCount, 5) : 1
|
|
396
396
|
```
|
|
397
|
-
|
|
398
|
-
## Next Steps
|
|
399
|
-
|
|
400
|
-
For detailed explanations, see:
|
|
401
|
-
- **[System Architecture](./system-architecture.md)** - Understand the big picture
|
|
402
|
-
- **[How Scheduling Works](./how-scheduling-works.md)** - Deep-dive into Governor and Scheduler
|
|
403
|
-
- **[How AI Adaptation Works](./how-ai-adaptation-works.md)** - Learn about hints and tools
|
|
404
|
-
- **[Configuration Guide](./configuration-and-constraints.md)** - Set up endpoints correctly
|
|
@@ -292,14 +292,6 @@ To use Cronicorn effectively, you need to understand:
|
|
|
292
292
|
|
|
293
293
|
5. **The system is eventually consistent**: Don't expect instant reactions to every change. The AI analyzes every 5 minutes, and hints apply on the next execution. Plan for minutes, not seconds.
|
|
294
294
|
|
|
295
|
-
## Next Steps
|
|
296
|
-
|
|
297
|
-
Now that you understand the architecture, you can dive deeper:
|
|
298
|
-
|
|
299
|
-
- **[How Scheduling Works](./how-scheduling-works.md)** - Deep-dive into the Scheduler worker and Governor logic
|
|
300
|
-
- **[How AI Adaptation Works](./how-ai-adaptation-works.md)** - Deep-dive into the AI Planner and hint system
|
|
301
|
-
- **[Coordinating Multiple Endpoints](./coordinating-multiple-endpoints.md)** - Patterns for building workflows
|
|
302
|
-
- **[Configuration and Constraints](./configuration-and-constraints.md)** - How to configure endpoints effectively
|
|
303
295
|
|
|
304
296
|
---
|
|
305
297
|
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: use-cases
|
|
3
|
+
title: Use Cases & Examples
|
|
4
|
+
description: Real-world scenarios showing how Cronicorn adapts to your application needs
|
|
5
|
+
tags:
|
|
6
|
+
- user
|
|
7
|
+
- examples
|
|
8
|
+
sidebar_position: 3
|
|
9
|
+
mcp:
|
|
10
|
+
uri: file:///docs/use-cases.md
|
|
11
|
+
mimeType: text/markdown
|
|
12
|
+
priority: 0.8
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Use Cases & Examples
|
|
16
|
+
|
|
17
|
+
Cronicorn's adaptive scheduling shines in scenarios where static cron jobs fall short. Here are real-world examples across different industries.
|
|
18
|
+
|
|
19
|
+
## E-Commerce: Flash Sale Monitoring
|
|
20
|
+
|
|
21
|
+
You're running a Black Friday sale and traffic spikes 5× normal volume. Your checkout system needs close monitoring, but you don't want to manually adjust schedules every hour.
|
|
22
|
+
|
|
23
|
+
**Setup:**
|
|
24
|
+
|
|
25
|
+
| Endpoint | Baseline | Purpose |
|
|
26
|
+
|----------|----------|---------|
|
|
27
|
+
| Traffic Monitor | Every 5 min | Track visitors and page load times |
|
|
28
|
+
| Order Processor Health | Every 3 min | Monitor checkout performance |
|
|
29
|
+
| Inventory Sync Check | Every 10 min | Ensure stock accuracy |
|
|
30
|
+
|
|
31
|
+
**What Happens:**
|
|
32
|
+
|
|
33
|
+
- **9am (sale starts)**: Traffic surges detected. AI tightens monitoring to every 30 seconds for the next hour.
|
|
34
|
+
- **10am (struggling)**: Slow pages detected. AI activates cache warm-up (one-shot) and increases monitoring.
|
|
35
|
+
- **11am (recovering)**: Performance stabilizes. AI gradually relaxes back to baseline over 30 minutes.
|
|
36
|
+
- **2pm (stable)**: All endpoints return to normal 3-10 minute intervals.
|
|
37
|
+
|
|
38
|
+
**Result**: Your team gets real-time visibility during the surge without manual schedule changes. The system backs off automatically when things stabilize.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Marketing: Content Publishing & Engagement Tracking
|
|
42
|
+
|
|
43
|
+
You publish blog posts and want to monitor engagement closely for the first 24 hours, then back off to daily checks.
|
|
44
|
+
|
|
45
|
+
**Setup:**
|
|
46
|
+
|
|
47
|
+
| Endpoint | Baseline | Behavior |
|
|
48
|
+
|----------|----------|----------|
|
|
49
|
+
| Publish Post | Cron: "0 9 * * MON" | Publishes every Monday at 9am |
|
|
50
|
+
| Track Analytics | Every 30 min | Page views, time on page |
|
|
51
|
+
| Check Email Opens | Every hour | Newsletter engagement |
|
|
52
|
+
| Promote Top Posts | Paused | Activates when engagement crosses threshold |
|
|
53
|
+
|
|
54
|
+
**What Happens:**
|
|
55
|
+
|
|
56
|
+
- **Monday 9am**: Post publishes on schedule
|
|
57
|
+
- **9am-6pm**: AI tightens analytics tracking to every 5 minutes (fresh content gets attention)
|
|
58
|
+
- **Tuesday-Friday**: AI relaxes to hourly checks (engagement is stable)
|
|
59
|
+
- **Friday**: High engagement detected, AI activates promotional boost endpoint
|
|
60
|
+
- **Next Monday**: Analytics reset to baseline 30 min intervals
|
|
61
|
+
|
|
62
|
+
**Result**: You get real-time engagement data when it matters most, without paying for excessive API calls once traffic stabilizes.
|
|
63
|
+
|
|
64
|
+
## DevOps: Infrastructure Health & Auto-Remediation
|
|
65
|
+
|
|
66
|
+
Your SaaS platform runs background monitoring that should attempt automatic fixes before paging engineers at 2am.
|
|
67
|
+
|
|
68
|
+
**Setup:**
|
|
69
|
+
|
|
70
|
+
- **Health checks** run continuously: API latency, error rates, database connections, queue depth
|
|
71
|
+
- **Investigation endpoints** start paused: slow query logs, memory profilers, distributed traces
|
|
72
|
+
- **Remediation actions** fire as one-shots: restart unhealthy pods, flush caches, scale workers
|
|
73
|
+
- **Alerts** escalate intelligently: Slack ops → Slack support → PagerDuty on-call
|
|
74
|
+
|
|
75
|
+
**What Happens:**
|
|
76
|
+
|
|
77
|
+
1. Database latency increases above threshold
|
|
78
|
+
2. AI activates slow query investigation (was paused)
|
|
79
|
+
3. Investigation identifies problematic query
|
|
80
|
+
4. System fires one-shot remediation to kill long-running queries
|
|
81
|
+
5. If fixed: Alert sent to Slack, investigation pauses again
|
|
82
|
+
6. If not fixed after 3 attempts: Page on-call engineer
|
|
83
|
+
|
|
84
|
+
**Result**: Most issues self-heal without waking anyone up. Engineers only get paged when automation can't resolve the problem.
|
|
85
|
+
|
|
86
|
+
## Data Engineering: ETL Pipeline Coordination
|
|
87
|
+
|
|
88
|
+
You run nightly data syncs from Salesforce, transform the data, and load it into your warehouse. The transformation step should only run after extraction succeeds.
|
|
89
|
+
|
|
90
|
+
**Setup:**
|
|
91
|
+
|
|
92
|
+
| Endpoint | Schedule | Notes |
|
|
93
|
+
|----------|----------|-------|
|
|
94
|
+
| Extract from Salesforce | Cron: "0 2 * * *" | Daily at 2am |
|
|
95
|
+
| Transform Records | Paused | Activates only after extraction |
|
|
96
|
+
| Load to Warehouse | Paused | Activates after transformation |
|
|
97
|
+
| Check Pipeline Lag | Every 2 min | Monitors data freshness |
|
|
98
|
+
|
|
99
|
+
**What Happens:**
|
|
100
|
+
|
|
101
|
+
- **2:00am**: Salesforce extraction starts
|
|
102
|
+
- **2:15am**: Extraction completes successfully. AI activates transformation endpoint for immediate one-shot run.
|
|
103
|
+
- **2:20am**: Transformation finishes. AI activates warehouse load for one-shot run.
|
|
104
|
+
- **2:25am**: Full pipeline complete. Investigation endpoints pause until tomorrow.
|
|
105
|
+
- **If extraction fails**: Transformation and loading stay paused. Alert fires.
|
|
106
|
+
|
|
107
|
+
**Result**: You coordinate complex dependencies without writing custom orchestration code. Each step waits for upstream success.
|
|
108
|
+
|
|
109
|
+
## SaaS Operations: Usage Monitoring & Billing
|
|
110
|
+
|
|
111
|
+
You need to track customer API usage hourly, send quota warnings at specific thresholds, and generate invoices monthly.
|
|
112
|
+
|
|
113
|
+
**Setup:**
|
|
114
|
+
|
|
115
|
+
- **Usage tracking**: Aggregate API calls every hour
|
|
116
|
+
- **Quota monitoring**: Check for overages every 10 minutes
|
|
117
|
+
- **Warning emails**: One-shot sends at 80%, 90%, 100% of quota
|
|
118
|
+
- **Invoice generation**: Cron runs on 1st of each month
|
|
119
|
+
- **Payment reminders**: Escalating sequence (3 days → 7 days → 14 days → 30 days overdue)
|
|
120
|
+
|
|
121
|
+
**What Happens:**
|
|
122
|
+
|
|
123
|
+
- **Throughout month**: Usage tracked hourly, quota checked every 10 min
|
|
124
|
+
- **Customer approaching limit**: AI fires one-shot warning emails at each threshold
|
|
125
|
+
- **1st of month at midnight**: Invoices generated for all accounts
|
|
126
|
+
- **Payment not received**: Reminder sequence starts automatically (paused between emails)
|
|
127
|
+
- **Payment received**: AI pauses further reminders
|
|
128
|
+
|
|
129
|
+
**Result**: Billing runs like clockwork with minimal manual intervention. Customers get timely warnings, and dunning sequences are fully automated.
|
|
130
|
+
|
|
131
|
+
## Web Scraping: Competitive Price Monitoring
|
|
132
|
+
|
|
133
|
+
You track competitor pricing across multiple sites, but need to respect their rate limits and adapt when they change.
|
|
134
|
+
|
|
135
|
+
**Setup:**
|
|
136
|
+
|
|
137
|
+
| Endpoint | Baseline | Constraints |
|
|
138
|
+
|----------|----------|-------------|
|
|
139
|
+
| Scrape Prices | Every 4 hours | Min: 30 min, Max: 12 hours |
|
|
140
|
+
| Validate Data | After each scrape | Checks for blocks/CAPTCHAs |
|
|
141
|
+
| Check Proxy Health | Every 5 min | Monitors rotating proxies |
|
|
142
|
+
| Alert Price Drop | Paused | Fires when competitor drops price |
|
|
143
|
+
|
|
144
|
+
**What Happens:**
|
|
145
|
+
|
|
146
|
+
- **Normal operation**: Scraping every 4 hours
|
|
147
|
+
- **Rate limit warning detected**: AI backs off to every 6 hours for next day
|
|
148
|
+
- **Competitor sale detected**: AI tightens to every 30 minutes (respects min interval)
|
|
149
|
+
- **CAPTCHA encountered**: Validation fails, AI pauses scraping for 2 hours
|
|
150
|
+
- **Proxy recovery**: Health check passes, AI resumes scraping
|
|
151
|
+
|
|
152
|
+
**Result**: You adapt to site changes automatically. Scrapers respect rate limits, pause when blocked, and intensify during competitor sales.
|
|
153
|
+
|
|
154
|
+
## Common Patterns
|
|
155
|
+
|
|
156
|
+
### Adaptive Monitoring Frequency
|
|
157
|
+
|
|
158
|
+
Start with a baseline, tighten when issues detected, relax when stable:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
Baseline: Every 5 minutes
|
|
162
|
+
During issues: Every 30 seconds (respects min interval)
|
|
163
|
+
When stable: Every 15 minutes (respects max interval)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Conditional Endpoint Activation
|
|
167
|
+
|
|
168
|
+
Keep expensive operations paused until needed:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
Investigation endpoints: Paused by default
|
|
172
|
+
Activate: When health checks fail
|
|
173
|
+
Deactivate: When issues resolve or timeout expires
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### One-Shot Actions with Cooldowns
|
|
177
|
+
|
|
178
|
+
Fire immediate actions that shouldn't repeat too quickly:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
Cache warm-up: Fire once now, don't repeat for 15 minutes
|
|
182
|
+
Alert escalation: Send once, pause for 1 hour before next
|
|
183
|
+
Scale workers: Trigger immediately, cooldown for 20 minutes
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Calendar-Based + Adaptive Hybrid
|
|
187
|
+
|
|
188
|
+
Use cron for time-sensitive tasks, intervals for everything else:
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
Daily reports: Cron "0 9 * * *" (always 9am)
|
|
192
|
+
Monitoring: Interval 300000ms (adapts between min/max)
|
|
193
|
+
Monthly billing: Cron "0 0 1 * *" (1st of month)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## When to Use Cronicorn
|
|
197
|
+
|
|
198
|
+
**Great fit:**
|
|
199
|
+
- You adjust cron schedules manually based on metrics
|
|
200
|
+
- You need backoff logic after failures
|
|
201
|
+
- You want tight monitoring during critical periods
|
|
202
|
+
- You coordinate multiple dependent endpoints
|
|
203
|
+
- You respect rate limits that vary by usage
|
|
204
|
+
|
|
205
|
+
**Probably overkill:**
|
|
206
|
+
- Simple daily backup at 2am (basic cron is fine)
|
|
207
|
+
- Completely static schedules that never change
|
|
208
|
+
- Sub-second precision required (use a real-time system)
|
package/package.json
CHANGED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Troubleshooting Authentication
|
|
3
|
-
description: How to resolve authentication issues with the Cronicorn MCP Server
|
|
4
|
-
mcp:
|
|
5
|
-
uri: "cronicorn://troubleshooting/authentication"
|
|
6
|
-
priority: 10
|
|
7
|
-
tags: [user, assistant]
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Troubleshooting Authentication
|
|
11
|
-
|
|
12
|
-
## Authentication Failed (401 Unauthorized)
|
|
13
|
-
|
|
14
|
-
If you see this error:
|
|
15
|
-
```
|
|
16
|
-
Authentication failed. Invalid or expired token. Please restart the MCP server to re-authenticate.
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
**What happened:**
|
|
20
|
-
- Your authentication token is no longer valid
|
|
21
|
-
- The MCP server has automatically cleared the invalid credentials
|
|
22
|
-
|
|
23
|
-
**How to fix:**
|
|
24
|
-
|
|
25
|
-
1. **Restart your editor/IDE:**
|
|
26
|
-
- **VS Code**: Reload the window (`Cmd+Shift+P` → "Developer: Reload Window")
|
|
27
|
-
- **Other editors**: Restart the application
|
|
28
|
-
|
|
29
|
-
2. **Complete the device flow:**
|
|
30
|
-
- A browser window will automatically open
|
|
31
|
-
- Sign in with your GitHub account
|
|
32
|
-
- Approve the device authorization request
|
|
33
|
-
- The MCP server will save the new credentials
|
|
34
|
-
|
|
35
|
-
3. **Try your operation again**
|
|
36
|
-
|
|
37
|
-
## Token Expired
|
|
38
|
-
|
|
39
|
-
If you see messages about an expired token during startup, don't worry! The MCP server automatically:
|
|
40
|
-
1. Detects the expired token
|
|
41
|
-
2. Deletes the invalid credentials
|
|
42
|
-
3. Starts a new device authorization flow
|
|
43
|
-
|
|
44
|
-
Just complete the browser-based approval and you're good to go.
|
|
45
|
-
|
|
46
|
-
## Manual Credential Reset
|
|
47
|
-
|
|
48
|
-
If you need to manually reset your credentials:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
# Delete the credentials file
|
|
52
|
-
rm ~/.cronicorn/credentials.json
|
|
53
|
-
|
|
54
|
-
# Restart your editor/IDE
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Where Are Credentials Stored?
|
|
58
|
-
|
|
59
|
-
Credentials are stored in: `~/.cronicorn/credentials.json`
|
|
60
|
-
|
|
61
|
-
This file contains:
|
|
62
|
-
- `access_token`: Your authentication token
|
|
63
|
-
- `refresh_token`: Token for refreshing (currently not used)
|
|
64
|
-
- `expires_at`: Unix timestamp when the token expires
|
|
65
|
-
|
|
66
|
-
The file has restricted permissions (0600) so only you can read it.
|
|
67
|
-
|
|
68
|
-
## Common Issues
|
|
69
|
-
|
|
70
|
-
### Browser Doesn't Open Automatically
|
|
71
|
-
- Manually navigate to the verification URL shown in the server logs
|
|
72
|
-
- Enter the user code displayed
|
|
73
|
-
|
|
74
|
-
### Device Code Expired
|
|
75
|
-
- You have 30 minutes to approve the device
|
|
76
|
-
- If it expires, just restart the MCP server to get a new code
|
|
77
|
-
|
|
78
|
-
### Still Having Issues?
|
|
79
|
-
- Check that the Cronicorn API is accessible
|
|
80
|
-
- Verify your internet connection
|
|
81
|
-
- Look for error messages in the MCP server logs (stderr)
|
|
82
|
-
- Report issues on [GitHub Discussions](https://github.com/weskerllc/cronicorn/discussions)
|