Skip to content

Comment on Show HN: Highlander – Stop Overlapping Python Cron Jobsparent

Comments

I use flock, and flock is better -- what if the machine reboots during the cron job? Then you will be left with a file, and the cron job will never restart without human intervention.

With flock, you're using kernel state, and everything works as expected. Everything is cleared when you reboot, no matter if it's during the cron job or otherwise.

This is completely false. If you actually read the source code, you would discover that once the left over file is read Highlander would know that the process is not currently running, remove the old PID file, and create a new one.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.