Onqueue is a lightweight, multithreaded task queue runner built in Rust. It features a socket-based client-server architecture for reliable task management, making it ideal for automating shell commands, deployment tasks, and lightweight job queues.
- β Socket-based client-server architecture - Fast, reliable TCP communication
- β Task queue management - Queue, execute, and monitor tasks with names and commands
- β Full CLI client - Complete command-line interface for task management
- β Multithreaded task runner - Concurrent task execution with configurable intervals
- β
Persistent queue state - Tasks saved to
records.ymlfor reliability - β Task lifecycle management - Add, list, status, retry, delete, and run tasks
- β Automatic retries - Built-in retry support for failed tasks
- β Service installation - Easy setup as system service on Windows, Linux, and macOS
- β Comprehensive testing - Full test suite with unit and integration tests
- β Cross-platform - Supports Windows, Linux, and macOS
Onqueue uses a client-server architecture with TCP socket communication:
- Server (
onqueued): Runs the task queue, executes tasks, and manages state - Client (
onqueue): CLI tool to interact with the server
The server listens on TCP sockets (default: 0.0.0.0:9876) and processes JSON-based commands from clients.
Windows:
# As Administrator
.\scripts\windows\install-service.ps1
Start-Service -Name OnqueueServerLinux:
sudo ./scripts/linux/install-service.sh
sudo systemctl enable --now onqueuedmacOS:
sudo ./scripts/macos/install-service.shSee Installation Guide for detailed instructions.
-
Build from source:
cargo build --release
-
Run the server:
./target/release/onqueued # Or on Windows: .\target\release\onqueued.exe -
Use the client:
./target/release/onqueue list
# Using default config (0.0.0.0:9876)
./onqueued
# Or with cargo
cargo run --bin onqueuedThe server will:
- Load configuration from
config.yml(optional) - Listen on the configured address (default:
0.0.0.0:9876) - Process queued tasks at the configured interval (default: 10 seconds)
- Save queue state to
records.yml
onqueue listonqueue add --name "my-task" --cmd "echo hello world"# Overall statistics
onqueue status
# Specific task status
onqueue status my-taskonqueue retry --name "my-task"onqueue delete --name "my-task"onqueue run --name "my-task"onqueue --server 192.168.1.100:9876 list# Start the server
./onqueued
# In another terminal, add a task
onqueue add --name "build" --cmd "cargo build --release"
# Check status
onqueue status build
# List all tasks
onqueue list# Add multiple tasks
onqueue add --name "task1" --cmd "echo 'Task 1'"
onqueue add --name "task2" --cmd "echo 'Task 2'"
onqueue add --name "task3" --cmd "echo 'Task 3'"
# Check overall status
onqueue status
# Output: {"total": 3, "queued": 2, "running": 0, "completed": 1, "failed": 0}
# Retry a failed task
onqueue retry --name "task1"
# Delete a completed task
onqueue delete --name "task2"Create config.yml:
host: "0.0.0.0"
port: 9876
task_interval: 10 # seconds between task checks
log_file: "logs/output.log"onqueue/
βββ src/
β βββ server.rs # Server binary (onqueued)
β βββ client.rs # Client binary (onqueue)
β βββ server_types.rs # Shared server types
β βββ client_types.rs # Shared client types
βββ scripts/
β βββ windows/ # Windows service scripts
β βββ linux/ # Linux systemd scripts
β βββ macos/ # macOS launchd scripts
β βββ README.md # Installation guide
βββ tests/ # Test suite
βββ config.yml.example # Configuration template
βββ records.yml.example # Queue records template
βββ Cargo.toml
βββ README.md
The server can be configured via config.yml:
| Option | Default | Description |
|---|---|---|
host |
0.0.0.0 |
Server bind address |
port |
9876 |
Server port |
task_interval |
10 |
Seconds between task checks |
log_file |
logs/output.log |
Log file path |
Run the test suite:
# Run all unit tests
cargo test
# Run specific test suite
cargo test --test server_queue_tests
cargo test --test server_protocol_tests
cargo test --test client_tests
# Run integration tests (requires running server)
cargo test --test integration_tests -- --ignoredSee Tests README for more details.
- USAGE.md - Complete usage guide
- Installation Guide - Service installation instructions
- Quick Start - Quick installation reference
- Feature TODO - Planned improvements
See FEATURE-TODO-LIST.md for upcoming improvements:
- Structured logging with
tracing - Web dashboard UI
- Docker support
- Task scheduling (cron-like)
- Authentication and security
- Task tagging and filtering
- Rust 1.70+ (stable)
- Cargo
# Build release binaries
cargo build --release
# Build specific binary
cargo build --release --bin onqueued
cargo build --release --bin onqueue# Run server
cargo run --bin onqueued
# Run client
cargo run --bin onqueue -- list# All tests
cargo test
# With output
cargo test -- --nocaptureContributions are welcome! Please feel free to submit a Pull Request.
MIT Β© Mark Wayne Menorca
Built with: