A lightweight Distributed Task Runner with a Go backend and React frontend.
Submit shell commands or scripts as tasks (jobs), execute them asynchronously, and track their status and output via a modern web UI.
- π Quick Start
- Features
- Project Structure
- Prerequisites
- Backend API
- Frontend Usage
- Notes
- Screenshots
- Contributing
- Future Potential Improvements
- License
If you don't have Go installed, download and install it from the official website:
cd backendRun the scheduler using the batch file (this will build and run the backend):
./dev.batNote: The first time you run the backend, Windows may show a firewall prompt. This is normalβallow access so the server can listen on port 8080.
go run .Note: On macOS/Linux, you typically will NOT see a firewall prompt. If you do, allow access so the server can listen on port 8080.
Server runs on http://localhost:8080
cd frontendnpm installnpm run devOpens on http://localhost:5173
- π§ Asynchronous task execution via worker pool
- πΎ Persistent storage with
jobs.json - π Retry mechanism for failed tasks (up to 3 attempts)
- π§ͺ Track status:
pending,running,completed,failed - π§© RESTful API in Go
- π¨ React + TypeScript UI for submitting and monitoring tasks
- π§Ή Clear history functionality
- π CORS support for frontend-backend integration
distributed-task-runner/
βββ backend/
β βββ main.go
β βββ handlers.go
β βββ jobs.go
β βββ ...
βββ frontend/
β βββ src/
β β βββ App.tsx
β β βββ JobSubmitter.tsx
β β βββ JobList.tsx
β β βββ ...
β βββ vite.config.ts
β βββ ...
βββ jobs.json # stores job data
βββ README.md
| Technology | Version/Requirement |
|---|---|
| Go | 1.20+ |
| Node.js | 16+ |
| npm/yarn | Any |
POST /jobsβ Enqueue a task{ "payload": "your-command" }GET /jobsβ List all tasksGET /jobs/{id}β Get a specific taskDELETE /jobs/clearβ Clear all task history
curl -X POST http://localhost:8080/jobs -H "Content-Type: application/json" -d '{"payload": "echo Hello"}'Response:
{
"id": "abc123",
"payload": "echo Hello",
"status": "pending",
"attempts": 0,
"created_at": "2025-08-02T14:32:47Z",
"updated_at": "2025-08-02T14:32:47Z"
}curl http://localhost:8080/jobsResponse:
[
{
"id": "abc123",
"payload": "echo Hello",
"status": "completed",
"attempts": 1,
"created_at": "2025-08-02T14:32:47Z",
"updated_at": "2025-08-02T14:33:01Z",
"output": "Hello\n"
}
]curl http://localhost:8080/jobs/<job_id>Response:
{
"id": "abc123",
"payload": "echo Hello",
"status": "completed",
"attempts": 1,
"created_at": "2025-08-02T14:32:47Z",
"updated_at": "2025-08-02T14:33:01Z",
"output": "Hello\n"
}curl -X DELETE http://localhost:8080/jobs/clear- Submit tasks (jobs) and monitor their status in real time.
- View job history, including command, status (color-coded), and timestamps.
- Use Clear History to delete all jobs.
- Frontend proxies requests to the backend (see
vite.config.ts).
- Commands run using
cmd(on Windows) orsh(on Unix). - Backend retries failed tasks (max 3).
- Data is written to
jobs.jsonafter execution. - CORS enabled for frontend access.
Contributions are welcome! To contribute:
- Fork the repo
- Create a new branch (
git checkout -b feature/your-feature) - Commit your changes
- Push to your branch
- Open a Pull Request
- Auth (JWT or session-based)
- SSE/WebSocket for real-time task (job) updates
- Dockerize backend and frontend
- Pagination for large task lists
- Task expiration / TTL
- Worker monitoring UI


