What happens if a cron job is still running when the next one starts?
Cron starts another instance anyway. Overlapping runs can corrupt data or pile up. Guard long jobs with a lock, for example flock around the command, so a second run exits or waits instead of running concurrently.
Answered in
Cron Expressions and the Gotchas That Bite in ProductionFive fields, four special characters, and a handful of traps: the OR rule, the tiny environment, silent output, overlapping runs and time zones.
Read the full analysisOther questions this article answers
More developer tooling questions
Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the Developer Tooling beat.