# Waiting and Watching

Waiting and Watching: Waiting for Things: watch, until and timeout, Running Work in Parallel: &, wait and xargs -P.

Updated: November 10, 2026

1. [Waiting for Things: watch, until and timeout](https://www.ask-codey.com/lessons/bash-watch-and-wait) (Journeyman): watch reruns a command every few seconds and shows its latest result, an until loop waits until a server answers, and timeout stops a command that takes too long, with exit code 124, so a script never waits forever.
2. [Running Work in Parallel: &, wait and xargs -P](https://www.ask-codey.com/lessons/bash-parallel-jobs) (Freelancer): Commands that each take a while can run side by side: & starts each one in the background and wait holds the script until all of them have finished, while xargs -P runs a set number at a time, so 12 one-second photo resizes take 3 seconds instead of 12.

Source: https://www.ask-codey.com/courses/bash-in-depth/topics/bash-waiting-and-watching
