Skip to main content
rbs job is scheduler mode: submit arbitrary commands or scripts to a cluster’s worker fleet with Slurm-class semantics — queues, priorities, dependencies, job arrays, time limits, requeue on worker loss, live logs — and none of Slurm’s setup. Jobs ride the same scheduler and workers as remote build execution, but consume dedicated per-worker job slots, so a fleet full of jobs can still execute the build actions those jobs spawn.

Pointing at a cluster

Every rbs job command needs a cluster address, from --server host:port or the RBS_REMOTE environment variable (with RBS_REMOTE_TOKEN for authentication):
The cluster itself is just rbs: rbs remote serve runs the scheduler (and cache), and each machine that should execute work joins with rbs remote worker. rbs remote status shows workers, queue depth, and jobs by state — see Remote Cache & Execution.

Submitting work

Submit flags

Getting code in and results out

Traditional schedulers assume every node sees a shared filesystem, so getting code onto the cluster is your problem. rbs jobs move content instead, through the same content-addressed store the build cache uses. --inputs stages content into the directory the payload starts in. Each value is a path, a built //pkg:target label, or DEST=SRC to land content in a subdirectory:
Inputs are staged before the job is queued, and only blobs the cluster does not already hold cross the wire — resubmitting a tree that changed by one file uploads one file, and a gang of N nodes costs one upload rather than N clones. A target label stages the outputs already built for RBS_TARGET_PLATFORM, so on a cross-platform cluster, build for the workers’ platform first. --outputs declares what to collect back. The worker records the declared paths into the cluster’s content store when the job ends — including when it fails, so a crashed run’s checkpoints and logs are still recoverable — and you pull them down from wherever you are:

Managing jobs

The environment a job sees

The worker injects context into every payload: Multi-node jobs (--nodes N) gang-allocate N workers: the same command starts on every node with its rank injected, rank 0 drives, and distributed launchers like torchrun work out of the box:

Job targets in build files

A job’s shape — binary, resources, node count, retry policy — can also be declared as a target, keeping it versioned next to the code it runs:
ml_training_job accepts binary, data, args, env, cpu (default "1"), memory (default "4Gi"), gpus (default 0), partition, time_limit (default "1h"), nodes (default 1), plus fault-tolerance attributes: elastic, min_nodes, max_nodes, max_retries (default 3), and checkpoint_dir. batch_job is the simpler shape (binary, inputs, args, env, cpu, memory), and gpu_job(name, binary, gpus, ...) wraps ml_training_job with a GPU partition default.
Job targets are experimental. Building one produces a job manifest describing the work — it does not execute anything, and the scheduler does not yet consume these manifests directly. The supported execution path today is rbs job submit, which composes with built targets via --inputs //pkg:target.