Remote-Job-Executor is a job execution system that enables you to queue and execute shell commands across remote servers via SSH.
- Queue Management: Create and manage job queues with different priorities and configurations.
- Remote Execution: Execute commands and scripts on remote servers via SSH.
- Job Monitoring: Track job status, logs, and metrics in real-time.
- Worker Management: Manage worker processes that execute your jobs.
- CLI Interface: Easy-to-use command-line interface for all operations.
Screencast.from.12-07-25.05.33.47.AM.IST.webm
- Node.js 18+
- pnpm (Package Manager)
- PostgreSQL database
- Docker (optional, for local testing)
-
Clone the repository
git clone <your-repo-url> cd Remote-Job-Executor
-
Install dependencies
pnpm install
-
Set up environment
# Create environment file cp .env.example .env # Edit .env with your database and SSH settings
-
Start services (optional - for local testing)
# Starts PostgreSQL and test SSH server docker compose up -d
-
Set up database
# Generate Prisma client pnpm run prisma:generate # Push database schema pnpm run prisma:push
-
Build and install CLI
# Build and link CLI globally pnpm run build:link
-
Test installation
# Test the CLI rje --help
-
Test DB setup
# To run tests, you will need a test DB, setup one locally. # Push the schema to the test DB DATABASE_URL="postgresql://your_user:your_password@localhost:5432/remote_job_test" pnpm prisma db push # To run tests pnpm test
Once installed, you can start using the CLI:
# Create your first queue
rje queue create --name "my-first-queue"
# Add a simple job
rje job add --queue "my-first-queue" --name "test-job" --command "date"
# List jobs
rje job list --queue "my-first-queue"
# Start a worker to process jobs
rje worker start --queue "my-first-queue"
For detailed usage instructions, examples, and all available commands, see the Complete Commands Guide.