So I have couple of things to make sure crons are running ok.
- Protection against stacking ->
flock
(manual) - Monitoring cron availability -> https://healthchecks.io/
- Prevent "hanging" cronjobs -> ?
The problem: Cronjobs are protected from stacking with flock
. It creates a lock with a lock file. But when a cronjob hangs or just doesn't finish for whatever reason the lock never expires. And with this the cronjob never runs again unit the lock file is manually removed
Question: How can I solve the issue of hanging cronjobs and never starting again because of the infinite lock?
I tried to just put timeout 3600
in the cron command without any luck.