Skip to content

sunjay-dev/CronJob-Scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CronJob-Scheduler

CronJob image

A simple yet powerful cron job scheduler to automate recurring API requests (GET/POST) using Agenda.js. Schedule jobs, view logs, and control execution β€” all from a modern web dashboard.


πŸš€ Features

  • πŸ•’ Schedule recurring jobs using cron expressions
  • πŸ“‘ Supports GET, POST and many other requests options with custom headers/body
  • 🧠 Built on Agenda.js for robust background processing
  • πŸ“Š View job execution logs and status (success/failure)
  • ✨ Toggle jobs on/off without deleting them
  • πŸ’» Clean React + Tailwind
  • πŸ” JWT-based authentication
  • ⚑ Dedicated Job Runner for background execution
  • πŸ“ˆ Real-time monitoring with Prometheus + Grafana

πŸ› οΈ Tech Stack

MongoDB TypeScript React TailwindCSS Chart.js Lucide-React Express.js Redux-toolKit Agenda.js PNPM Passport.js Resend Zod Upstash Pino Docker Redis React Hook Form Grafana Prometheus


πŸ—οΈ Current Architecture

CronJob architecture Image

πŸ“¦ Installation

⚠️ Before you start, make sure you have the following installed:

  • pnpm (package manager used in this project)
  • TypeScript (tsc compiler)

1. Clone the repository

git clone https://github.com/sunjay-dev/CronJob-Scheduler.git
cd CronJob-Scheduler

2. Setup Backend (Required)

cd Backend
pnpm install
cp .env.example .env
# Update .env with your MongoDB URI (Other fields are optional until you're testing them)

pnpm run dev

3. Setup Frontend (Required)

cd Frontend
pnpm install

# Update VITE_BACKEND_URL in .env (defaults to http://localhost:3000)

pnpm run dev

4. Setup Job Runner

⚑ Required for actual scheduling

cd job-runner
pnpm install
cp .env.example .env
# Make sure the MongoDB URI matches the backend
pnpm run dev

4. Setup Email Service (Optional)

⚑ Only needed if you want to test/run email service.

cd email-service
pnpm install
cp .env.example .env
# Update .env with your RESEND_EMAIL_API_KEY, SENDEREMAIL, and EMAIL_SERVICE_SECRET

pnpm run dev

πŸ–₯️ Folder Structure

CronJob-Scheduler/
β”œβ”€β”€ Backend/        # Server (Express + Agenda.js)
β”œβ”€β”€ Frontend/       # Client (React + Tailwind)
β”œβ”€β”€ job-runner/     # Background worker (Agenda.js)
β”œβ”€β”€ email-service/  # Email microservice (Express + Resend)
β”œβ”€β”€ README.md

🧭 Roadmap

  • Create/Update/Delete jobs
  • Job toggle (enable/disable)
  • Execution logs viewer
  • Support for All http requests methods
  • User account settings
  • Google login config
  • Forget password
  • Email notifications on failure
  • Retry on failure + backoff strategy
  • Monitoring with Prometheus + Grafana
  • Convert to Micro-service architecture

🀝 Contributing

Contributions, suggestions, and improvements are always welcome!

About

An Agenda.js-powered cron job scheduler to automate API/webhook calls. Built with Agenda.js, Express, and React.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •