Random day of month
This commit is contained in:
parent
30066e8de8
commit
5a2c9becab
|
@ -1084,6 +1084,9 @@ function randomize_cron {
|
|||
sed -i "s|17 \*\t|$randmin *\t|g" /etc/crontab
|
||||
|
||||
# randomize monthly cron job time and day
|
||||
randmin=$(($RANDOM%60))
|
||||
randhr=$(($RANDOM%22+1))
|
||||
randdom=$(($RANDOM%22+1))
|
||||
sed -i "s|52 6\t|$randmin $randhr\t|g" /etc/crontab
|
||||
sed -i "s|\t1 \* \*|\t$randdom * *|g" /etc/crontab
|
||||
|
||||
|
|
Loading…
Reference in New Issue