From 32b3717c32196dea163e87b40d428774fded5c25 Mon Sep 17 00:00:00 2001 From: neilpang Date: Tue, 17 Jan 2017 21:49:02 +0800 Subject: [PATCH 1/2] random minute --- acme.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/acme.sh b/acme.sh index 66abd882..49f3c3fd 100755 --- a/acme.sh +++ b/acme.sh @@ -3371,15 +3371,18 @@ installcronjob() { _err "Can not install cronjob, $PROJECT_ENTRY not found." return 1 fi + + _t=$(_time) + random_minute=$(_math $_t % 60) if _exists uname && uname -a | grep SunOS >/dev/null; then crontab -l | { cat - echo "0 0 * * * $lesh --cron --home \"$LE_WORKING_DIR\" > /dev/null" + echo "$random_minute 0 * * * $lesh --cron --home \"$LE_WORKING_DIR\" > /dev/null" } | crontab -- else crontab -l | { cat - echo "0 0 * * * $lesh --cron --home \"$LE_WORKING_DIR\" > /dev/null" + echo "$random_minute 0 * * * $lesh --cron --home \"$LE_WORKING_DIR\" > /dev/null" } | crontab - fi fi From 0f21537f148e0522d305713b66677de387d95b28 Mon Sep 17 00:00:00 2001 From: neilpang Date: Tue, 17 Jan 2017 22:01:36 +0800 Subject: [PATCH 2/2] format --- acme.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acme.sh b/acme.sh index 49f3c3fd..0ee1eeee 100755 --- a/acme.sh +++ b/acme.sh @@ -3371,7 +3371,7 @@ installcronjob() { _err "Can not install cronjob, $PROJECT_ENTRY not found." return 1 fi - + _t=$(_time) random_minute=$(_math $_t % 60) if _exists uname && uname -a | grep SunOS >/dev/null; then