From 8a8920529eb9ea804fafb3a01b6e88d5d0e24351 Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Sat, 4 Apr 2026 13:06:07 +0000 Subject: [PATCH] Run dehydrated cronjob at random time. --- cronjob-dehydrated | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cronjob-dehydrated b/cronjob-dehydrated index ec31e99..7afa21c 100755 --- a/cronjob-dehydrated +++ b/cronjob-dehydrated @@ -1,6 +1,5 @@ #!/bin/bash - -# Delay the run for 15 hours (from midnight) and then run at a random time within 3 hours after that. -sleep $(( 54000 + (RANDOM % 10800) )) - -/usr/sbin/dehydrated -c >/dev/null +# Run this job in the background. +( # Delay the run for 15 hours (from midnight) and then run at a random time within 3 hours after that. + sleep $(( 54000 + (RANDOM % 10800) )) + /opt/sbin/dehydrated -c >/dev/null ) &