From b545999fb3d362def69f3df47675e5f50fdaed1c Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Fri, 15 Nov 2024 19:53:15 +0100 Subject: [PATCH] Fix one if --- distributed_cron.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/distributed_cron.sh b/distributed_cron.sh index 966a733..d0e31d4 100644 --- a/distributed_cron.sh +++ b/distributed_cron.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +# Author: H2 invent GmbH +# License: AGPLv3 +# Usage: Use the helper script in cronjobs in hosts or containers. +# The cron_lock can be shared so the job will only be executed one. + TIME=$(shuf -i 0-800 -n1) sleep 0.$TIME echo "Sleep for 0.$TIME" @@ -27,4 +32,5 @@ then exit 0 else echo "Other Server is running cron job" -exit 0 \ No newline at end of file + exit 0 +fi