From eefbb33b5a3271dabd93b5fb0efc7a966b2471e2 Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Mon, 2 Oct 2023 23:48:41 +0900 Subject: [PATCH] Update autoRepackAlmaLinuxCloudImages.sh --- .../RedHat/AlmaLinux/autoRepackAlmaLinuxCloudImages.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Linux_reinstall/RedHat/AlmaLinux/autoRepackAlmaLinuxCloudImages.sh b/Linux_reinstall/RedHat/AlmaLinux/autoRepackAlmaLinuxCloudImages.sh index 30f0261..d60d397 100644 --- a/Linux_reinstall/RedHat/AlmaLinux/autoRepackAlmaLinuxCloudImages.sh +++ b/Linux_reinstall/RedHat/AlmaLinux/autoRepackAlmaLinuxCloudImages.sh @@ -39,7 +39,9 @@ for distNum in "9"; do done # write crontab task +# Crontab simulator: https://crontab.guru/ +# Schedule cronjob for the certain day in a week: https://blog.healthchecks.io/2022/09/schedule-cron-job-the-funky-way/ if [[ ! `grep -i "autorepackalmalinuxcloudimages" /etc/crontab` ]]; then - sed -i '$i 0 7 1-7 2,4,6,8,10,12 7 root bash /root/autoRepackAlmaLinuxCloudImages.sh' /etc/crontab + sed -i '$i 0 7 */100,1-7 * SUN root bash /root/autoRepackAlmaLinuxCloudImages.sh' /etc/crontab /etc/init.d/cron restart fi