Keep jobs running after you disconnect
tmux, nohup and launchd for long builds and servers.
Anything started in an SSH session stops when the session ends, unless you detach it.
tmux (easiest)
brew install tmux
tmux new -s work # start; press Ctrl-b then d to detach
tmux attach -t work # come back later
One-off command
nohup ./long-build.sh > build.log 2>&1 &
For something that must start by itself after a reboot, use launchd: a LaunchDaemon in /Library/LaunchDaemons starts at boot, while a LaunchAgent starts only when dev is logged in to the desktop. Apple explains both in Creating Launch Daemons and Agents. The Mac is set never to sleep.