From 901347ff646e78869a8e0c150484736ed1776eec Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 8 Mar 2018 11:55:29 +0400 Subject: [PATCH 1/1] do not run from cron if lockfile exists --- .crontab.d/offlineimap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.crontab.d/offlineimap b/.crontab.d/offlineimap index 3837a9e..8d01b95 100644 --- a/.crontab.d/offlineimap +++ b/.crontab.d/offlineimap @@ -1,2 +1,2 @@ -*/30 * * * * sleep $((900 * $RANDOM / 32768)) && ip r | grep -q via && offlineimap -u Quiet -o -a madduck.net -55 */8 * * * sleep $((300 * $RANDOM / 32768)) && ip r | grep -q via && offlineimap -u Quiet -o -a madduck.net_bulk +*/30 * * * * sleep $((900 * $RANDOM / 32768)) && ip r | grep -q via && [ -e $VARDIR/offlineimap/madduck.net.lock ] || offlineimap -u Quiet -o -a madduck.net +55 */8 * * * sleep $((300 * $RANDOM / 32768)) && ip r | grep -q via && [ -e $VARDIR/offlineimap/madduck.net_bulk.lock ] || offlineimap -u Quiet -o -a madduck.net_bulk -- 2.39.5