Skip to content

Remote-Job-Executor is a job execution system that enables you to queue and execute shell commands across remote servers via SSH.

Notifications You must be signed in to change notification settings

manish-singh-bisht/Remote-Job-Executor

Repository files navigation

Remote-Job-Executor

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.

DEMO

Screencast.from.12-07-25.05.33.47.AM.IST.webm

Local Installation

Prerequisites

  • Node.js 18+
  • pnpm (Package Manager)
  • PostgreSQL database
  • Docker (optional, for local testing)

Installation Steps

  1. Clone the repository

    git clone <your-repo-url>
    cd Remote-Job-Executor
  2. Install dependencies

    pnpm install
  3. Set up environment

    # Create environment file
    cp .env.example .env
    # Edit .env with your database and SSH settings
  4. Start services (optional - for local testing)

    # Starts PostgreSQL and test SSH server
    docker compose up -d
  5. Set up database

    # Generate Prisma client
    pnpm run prisma:generate
    
    # Push database schema
    pnpm run prisma:push
  6. Build and install CLI

    # Build and link CLI globally
    pnpm run build:link
  7. Test installation

    # Test the CLI
    rje --help
  8. 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
    

Quick Start

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"

📖 Complete Documentation

For detailed usage instructions, examples, and all available commands, see the Complete Commands Guide.

About

Remote-Job-Executor is a job execution system that enables you to queue and execute shell commands across remote servers via SSH.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages