stack: FastAPI + React + MongoDB + Redis
Cronjob scheduler in react which stores in mongodb and uses redis for backend and fastAPI to call redis when next time is met
Run Mongodb deamon and redis-cli before running the application
Backend Setup
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtEnvironment (Default localhost IPs are used for redis and mongod)
Run FastAPI:
uvicorn app.main:app --reload --host 172.0.0.1 --port 8000Run celery:
celery -A app.celery_worker.celery_app worker --beat --loglevel=infoFrontend Setup Install and run Vite dev server:
cd frontend
npm install
npm run devMongoDB (CLI)
# Debian based:
sudo systemctl start mongodbList all jobs created till now:
mongosh
use vokecheck
db.jobs.find().pretty()Redis (local) Start server:
redis-serverSubscribe to the jobs channel to observe scheduler output:
redis-cli SUBSCRIBE jobsAPI usage using CLI- Create a job:
curl -X POST http://localhost:8000/jobs \
-H 'Content-Type: application/json' \
-d '{
"name": "Example",
"cron": "*/5 * * * *",
"next_run": "2025-12-16T10:00:00Z",
"start_date": "2025-12-16T09:00:00Z",
"end_date": "2025-12-16T23:59:00Z"
}'List jobs:
curl http://localhost:8000/jobs