avoiding duplicate cronjobs

Sometimes you want to run a cronjob on a frequent basis, but you rarely want a new one to start before the old one has finished. There is an easy tool in FreeBSD base called lockf. It is similar to the flock tool. Here is an example I am using: Based on the man page, the lockf utility acquires an exclusive lock on /tmp/.rsyncer.rsync.papers, creating it if necessary, and removing the file on […]

avoiding duplicate cronjobs Read More ยป