From 97010d71ff51706bac6bce430fcabbd9901772c5 Mon Sep 17 00:00:00 2001 From: Jose Henrique Date: Sun, 29 Dec 2024 15:38:04 -0300 Subject: [PATCH] fixing crontab lol --- scripts-download.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts-download.sh b/scripts-download.sh index 2ebb494..b526ca7 100644 --- a/scripts-download.sh +++ b/scripts-download.sh @@ -151,14 +151,14 @@ for FILE in "${FILES[@]}"; do echo -e "${LIGHT_BLUE}[i] [$FILE] Adding crontab...${NC}" if [ "$FILE" == "clean.sh" ]; then - (crontab -l 2>/dev/null; echo "0 0 * * * ${CURRENT_WORKDIR}/$FILE") | crontab - + (crontab -l 2>/dev/null; echo "0 0 * * * ${CURRENT_WORKDIR}/$FILE > /dev/null") | crontab - elif [ "$FILE" == "backup.sh" ]; then - (crontab -l 2>/dev/null; echo "0 0 * * * ${CURRENT_WORKDIR}/$FILE") | crontab - + (crontab -l 2>/dev/null; echo "0 0 * * * ${CURRENT_WORKDIR}/$FILE > /dev/null") | crontab - elif [ "$FILE" == "docker-updater.sh" ]; then - (crontab -l 2>/dev/null; echo "0 3 */4 * * ${CURRENT_WORKDIR}/$FILE") | crontab - + (crontab -l 2>/dev/null; echo "0 3 */4 * * ${CURRENT_WORKDIR}/$FILE > /dev/null") | crontab - else echo -e "${YELLOW}[w] [$FILE] Warning: Crontab specific schedule not setup.${NC}" >&2 - (crontab -l 2>/dev/null; echo "0 0 * * * ${CURRENT_WORKDIR}/$FILE") | crontab - + (crontab -l 2>/dev/null; echo "0 0 * * * ${CURRENT_WORKDIR}/$FILE" > /dev/null) | crontab - fi echo -e "${GREEN}[✓] [$FILE] Crontab added, double-checking set up...${NC}"