Update autoRepackAlmaLinuxCloudImages.sh

This commit is contained in:
Molly Lau 2023-10-12 17:25:54 +09:00 committed by GitHub
parent 1fc649ea8f
commit 1df1a4db9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ done
# write crontab task # write crontab task
# Crontab simulator: https://crontab.guru/ # 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/ # 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 if [[ ! $(grep -i "autorepackalmalinuxcloudimages" /etc/crontab) ]]; then
sed -i '$i 0 7 */100,1-7 * SUN root bash /root/autoRepackAlmaLinuxCloudImages.sh' /etc/crontab sed -i '$i 0 7 */100,1-7 * SUN root bash /root/autoRepackAlmaLinuxCloudImages.sh' /etc/crontab
crontab -l crontab -l
/etc/init.d/cron reload /etc/init.d/cron reload