Skip to content

jobrunner

Usage
jobrunner [-t <tool>] [<subcommand>] [<name>] [<command>...]
jr [-t <tool>] [<subcommand>] [<name>] [<command>...]

Runs, lists, inspects, re-attaches to, and terminates named background jobs using tmux or GNU screen as the process engine. Unlike bkg and detach, which discard output, a jobrunner job keeps a live terminal you can return to later — it survives closing the shell, and attach restores it in any subsequent session. Run and manage named background jobs. Jobs are detached from the shell and backed by tmux (preferred) or GNU screen.

If the job name is omitted when starting a new job (e.g. jobrunner sleep 1), a memorable, random name (like sleepy-badger) will be generated.

0 Command succeeded, help was shown, or no jobs are running
1 The named job does not exist, is already running, or failed
2 Unknown subcommand or job, invalid tool or name, or missing argument
127 neither tmux nor screen is installed

Detach from an attached job with Ctrl-A then D; the job keeps running. Commands are executed directly rather than through a shell, so pipes and redirections must be wrapped explicitly, e.g. jobrunner run sync fish -c ‘a | b’. A -h or --help anywhere shows this help instead of starting a job, so separate a command that takes one with –, e.g. jobrunner run – make --help.

Terminal window
jobrunner run -n build make -j8
jobrunner sleep 1000
jobrunner -t screen run -n backup rsync -a ./data remote:/backup/
jobrunner list
jobrunner logs build
jobrunner build
jobrunner kill build

Dependencies: tmux, screen, __jobrunner_sessions

Classification: bypasses-shadow(cat,rm)

Used by: jr