Summary: If a 5-minute cron job stalls for 12 minutes, cron spawns a second and third copy concurrently until memory or DB locks exhaust.

Broken Pattern

*/5 * * * * /usr/local/bin/sync_orders.sh

Production-Safe Fix

*/5 * * * * /usr/bin/flock -n /tmp/sync_orders.lock /usr/local/bin/sync_orders.sh

Why This Happens

flock -n acquires a non-blocking OS file lock and exits immediately if the previous run is still alive. In Kubernetes CronJobs, set concurrencyPolicy: Forbid.