Cron jobs

Preventing duplicate cron job executions

I feel like sometimes cron jobs create more problems than they solve. It’s not the fault of cron, but rather the jobs being executed. This is especially true when the jobs result in duplicate running instances like the following example. $ ps -elf | grep forever 4 S vagrant 4095 4094 0 80 0 - 1111 wait 21:59 ? 00:00:00 /bin/sh -c /var/tmp/forever.sh 0 S vagrant 4096 4095 0 80 0 - 2779 wait 21:59 ?