CR

Cronlytic MCP Server: CRUD for Serverless Cron Jobs

Manage serverless cron jobs with full CRUD using Cronlytic MCP server for reliable, scalable scheduling and automation.

Quick Install
npx -y @Cronlytic/cronlytic-mcp-server

Overview

Cronlytic MCP Server provides a lightweight HTTP service for creating, reading, updating, and deleting serverless cron jobs. It is designed to manage scheduled tasks in environments where you want to trigger remote functions or HTTP endpoints at specified cron intervals without managing a full scheduler fleet. The server exposes a simple REST API that lets developers configure and control scheduled jobs programmatically and integrates with serverless targets (webhooks, cloud functions, or internal endpoints).

Using Cronlytic helps centralize scheduling logic, provides consistent job metadata storage, and supports features like timezones, retries, and on-demand triggers. It is useful for teams that need reliable, auditable scheduling with the flexibility to change schedules at runtime or integrate scheduling into CI/CD and infrastructure-as-code workflows.

GitHub: https://github.com/Cronlytic/cronlytic-mcp-server

Features

  • Full CRUD REST API for serverless cron jobs (create, list, get, update, delete)
  • Standard cron expression support with timezone configuration
  • On-demand trigger endpoint for manual or CI-driven runs
  • Retry policy, timeout, and HTTP headers/payload for each job
  • Persistent storage (configurable via DATABASE_URL) and in-memory mode for development
  • OpenAPI/Swagger spec and health/metrics endpoints
  • Lightweight and easily deployable (Docker or Node.js runtime)
  • Web dashboard and CLI integrations (where available in the repo)

Installation / Configuration

Clone the repository and install dependencies:

git clone https://github.com/Cronlytic/cronlytic-mcp-server.git
cd cronlytic-mcp-server
npm install

Create a .env configuration (example):

PORT=8080
DATABASE_URL=postgres://user:pass@localhost:5432/cronlytic
JWT_SECRET=replace-with-a-secure-secret
NODE_ENV=production
DEFAULT_TIMEZONE=UTC

Start locally:

# Development (nodemon/watch mode)
npm run dev

# Production
npm start

Run with Docker:

docker build -t cronlytic-mcp-server .
docker run -p 8080:8080 \
  -e DATABASE_URL="postgres://user:pass@db:5432/cronlytic" \
  -e JWT_SECRET="your-secret" \
  cronlytic-mcp-server

Optional Docker Compose snippet:

version: '3.8'
services:
  cronlytic:
    image: cronlytic-mcp-server:latest
    ports:
      - "8080:8080"
    environment:
      - DATABASE_URL=postgres://user:pass@db:5432/cronlytic
      - JWT_SECRET=your-secret
  db:
    image: postgres:14
    environment:
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=pass
      - POSTGRES_DB=cronlytic

Configuration summary:

Env varPurposeExample
PORTHTTP port8080
DATABASE_URLPostgreSQL connection stringpostgres://…
JWT_SECRETAPI auth token signingreplace-with-secret
DEFAULT_TIMEZONEDefault timezone for schedulesUTC

Available Resources

The server exposes standard REST endpoints for job management and operational resources:

  • GET /health — basic health check
  • GET /metrics — Prometheus-style metrics (if enabled)
  • GET /openapi.json — OpenAPI specification
  • Authentication via JWT (if JWT_SECRET provided)

Job endpoints:

  • GET /jobs — list jobs
  • POST /jobs — create a job
  • GET /jobs/:id — read a job
  • PUT /jobs/:id — update a job
  • DELETE /jobs/:id — delete a job
  • POST /jobs/:id/trigger — trigger now (manual run)

Example job JSON payload:

{
  "name": "daily-report",
  "schedule": "0 2 * * *",
  "timezone": "UTC",
  "target": {
    "url": "https://api.example.com/functions/generate-report",
    "method": "POST",
    "headers": { "Authorization": "Bearer X" },
    "payload": { "reportType": "daily" }
  },
  "retry": { "retries": 3, "backoffSeconds": 30 },
  "enabled": true
}

Example curl: create a job

curl -X POST http://localhost:8080/jobs \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d @job.json

Use Cases

  • Periodic data pipelines: trigger serverless ETL functions nightly to extract and transform data and push results to storage or databases.
  • Scheduled notifications: run a job that hits a mailer API to deliver newsletters or account alerts at specific times in user timezones.
  • Housekeeping tasks: run database vacuuming, cache eviction, or temporary file cleanup at off-peak hours.
  • On-demand job control from CI/CD: create or update schedules as part of deployment pipelines (for feature flags or environment-specific schedules).
  • Cross-service orchestration: coordinate serverless functions across microservices by triggering endpoints at defined intervals and recording run metadata.

Concrete example — nightly DB cleanup:

  1. Create a job with schedule “0 3 * * *” and timezone “America/New_York”.
  2. Target is an internal admin endpoint that performs cleanup.
  3. Configure retries to 2 and backoff 60 seconds.
  4. Use POST /jobs/:id/trigger from a deployment script to run immediately after a migration if needed.

Notes for Developers

  • Cronlytic stores job metadata separately from your worker logic — the target can be any HTTP-accessible endpoint (including authenticated cloud functions).
  • Ensure the target endpoint has appropriate authentication and idempotency, especially for retries and manual triggers.
  • Use the OpenAPI spec at /openapi.json to generate client SDKs or integrate with API gateways.
  • For production, run with a persistent database and set a secure JWT_SECRET for API protection.