flock -n /tmp/job.lock -c 'command'
Category: Cron & Scheduling
flock -n /tmp/job.lock -c 'command'
Run cron job with file lock to prevent parallel runs
Runs a cron job with a file lock: if the previous run is still going, this new run is skipped. Prevents overlapping jobs.