flock

Prevent overlapping runs

low risk

interactive breakdown — edit the command and press Explain
$ 
What it does

Wraps a command with a file lock. See the flags and examples below, and run `man flock` for the full reference.

Examples
flock -n /tmp/job.lock ./job.shSkip if already running · explain & risk-check →
Related
cron
Open the full explainer →More in System & Processes

Reference text is hand-written and may be incomplete — check man flock for your version. Test destructive commands on a non-production system first.