Cronix is a self-hosted automation platform for scheduling and monitoring HTTP requests via cron jobs or webhook triggers. Built as a Turborepo monorepo with a Next.js frontend and NestJS backend, it provides a clean dashboard to manage workspaces, configure jobs, track execution history, and receive failure notifications via email.
Designed for developers and DevOps who need a lightweight, self-hostable services .
Cron-based scheduling with validated cron expressions and quick presets (minute, hourly, daily, weekly, monthly).
Webhook-triggered jobs with unique tokens and URLs for on-demand execution.
Workspace organization - group jobs into workspaces with per-user ownership isolation.
Execution tracking with detailed logs, HTTP status codes, duration, retry attempts, and trigger types.
Dashboard & analytics - total/active/paused job counts, 24-hour success rate, upcoming jobs, and recent executions.
Email notifications on job failure via Resend, configurable per job.
OAuth authentication - login with Google or GitHub (JWT access + refresh tokens in httpOnly cookies).
Rate limiting & security - Helmet.js headers, CORS, Redis-backed rate limiting, input validation.
Automatic cleanup - nightly purge of old logs (7 days) and executions (30 days).
Node.js 20+
PostgreSQL running locally or remotely
Redis running locally or remotely (Upstash recommended)
pnpm 9+
# 1. Clone the repository
git clone https://github.com/your-username/cronix.git
cd cronix
# 2. Install dependencies
pnpm install
# 3. Set up environment variables
cp apps/server/example.env apps/server/.env
cp packages/database/.env.example packages/database/.env
# Edit the .env files with your configuration
# 4. Generate Prisma client
pnpm --filter database db:generate
# 5. Apply database migrations
pnpm --filter database db:migrate
# 6. Start all apps in development mode
pnpm dev
The frontend runs on http://localhost:3000 and the API on http://localhost:3001 .
Server (apps/server/.env)
Variable
Required
Description
NODE_ENV
No
development, production, or test
PORT
No
Server port (default: 3001)
ALLOWED_ORIGINS
Yes
Comma-separated CORS origins
FRONTEND_URL
No
Frontend URL for redirects (default: http://localhost:3000)
JWT_SECRET
Yes
Min 32 chars, JWT signing key
JWT_EXPIRES_IN
No
Access token expiry (default: 15m)
REFRESH_TOKEN_SECRET
Yes
Min 32 chars, refresh token signing key
JWT_REFRESH_EXPIRES_IN
No
Refresh token expiry (default: 7d)
GOOGLE_CLIENT_ID
Yes
Google OAuth client ID
GOOGLE_CLIENT_SECRET
Yes
Google OAuth client secret
GOOGLE_CALLBACK_URL
No
Google OAuth callback (has default)
GITHUB_CLIENT_ID
Yes
GitHub OAuth client ID
GITHUB_CLIENT_SECRET
Yes
GitHub OAuth client secret
GITHUB_CALLBACK_URL
No
GitHub OAuth callback (has default)
DATABASE_URL
Yes
PostgreSQL connection string (Prisma)
REDIS_URL
No
Full Redis URL (redis://... or rediss://...)
REDIS_HOST
No
Redis host (fallback if no REDIS_URL)
REDIS_PORT
No
Redis port (fallback if no REDIS_URL)
UPSTASH_REDIS_HOST
No
Upstash Redis host (alternative to above)
UPSTASH_REDIS_TOKEN
No
Upstash Redis token
RESEND_API_KEY
Yes
Resend API key for failure notifications
FROM_EMAIL
No
Sender email (default: Cronix <onboarding@resend.dev>)
Database (packages/database/.env)
Variable
Required
Description
DATABASE_URL
Yes
PostgreSQL connection string
DATABASE_POOL_MIN
No
Min pool connections (default: 0)
DATABASE_POOL_MAX
No
Max pool connections (default: 10)
DATABASE_IDLE_TIMEOUT_MS
No
Idle connection timeout (default: 30000)
DATABASE_CONNECTION_TIMEOUT_MS
No
Connection timeout (default: 10000)
DATABASE_STATEMENT_TIMEOUT_MS
No
Statement timeout (default: 30000)
DATABASE_QUERY_TIMEOUT_MS
No
Query timeout (default: 30000)
DATABASE_TRANSACTION_MAX_WAIT_MS
No
Max transaction wait (default: 5000)
DATABASE_TRANSACTION_TIMEOUT_MS
No
Transaction timeout (default: 10000)
DATABASE_LOG_QUERIES
No
Enable query logging (default: false)
Variable
Required
Description
NEXT_PUBLIC_API_URL
Yes
Backend API URL (e.g., http://localhost:3001/api/v1)
See example.env and .env.example as templates.
Script
Description
pnpm dev
Start all apps in development mode
pnpm build
Build all apps and packages
pnpm lint
Lint all apps and packages
pnpm format
Format code with Prettier
pnpm check-types
Type-check all apps and packages
Script
Description
pnpm dev
Start Next.js dev server on port 3000
pnpm build
Build Next.js production bundle
pnpm start
Start production server
pnpm lint
Run ESLint
Script
Description
pnpm dev
Start NestJS dev server with watch mode
pnpm build
Build for production
pnpm start
Start production server
pnpm test
Run unit tests
pnpm test:e2e
Run end-to-end tests
pnpm lint
Run ESLint with auto-fix
Database (packages/database)
Script
Description
pnpm db:generate
Generate Prisma client from schema
pnpm db:migrate
Create and apply dev migrations
pnpm db:migrate:deploy
Apply migrations in production
pnpm db:push
Push schema without migrations
pnpm db:studio
Open Prisma Studio GUI
pnpm db:seed
Run seed script
The application is designed to be deployed as two separate services (frontend + backend) with a shared PostgreSQL and Redis instance.
Provision a PostgreSQL database (Neon, Supabase, Railway, etc.).
Provision a Redis instance (Upstash recommended for serverless).
Configure all environment variables for production.
Run pnpm --filter database db:migrate:deploy to apply migrations.
Build and deploy the backend (apps/server) and frontend (apps/web) separately.
Contributions are welcome! Please follow the existing code conventions and commit style (conventional commits via commitlint).
Fork the repository
Create a feature branch (git checkout -b feat/amazing-feature)
Commit your changes (git commit -m 'feat: add amazing feature')
Push to the branch (git push origin feat/amazing-feature)
Open a Pull Request
Distributed under the MIT license. See LICENSE for more information.
"Cronix" is not affiliated with any third-party cron service. Built with ❤️ using Next.js, NestJS, and Prisma.