From da5d5eec1ecac7707ccd196df9c67db7c48f5411 Mon Sep 17 00:00:00 2001 From: leo <426742@gmail.com> Date: Tue, 20 Aug 2024 09:47:49 +0500 Subject: [PATCH] autocommit --- config/cron.cfg | 2 +- cron.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/cron.cfg b/config/cron.cfg index 4d1af51..28e2194 100644 --- a/config/cron.cfg +++ b/config/cron.cfg @@ -1 +1 @@ -0 8 * * * /data/server-origin/cron.sh +0 10 * * * bash /data/server-origin/cron.sh diff --git a/cron.sh b/cron.sh index e8d5e2a..737e453 100644 --- a/cron.sh +++ b/cron.sh @@ -1,5 +1,8 @@ #!/bin/bash +LOG_FILE="/data/logs/cron.log" +exec > $LOG_FILE 2>&1 + if [ "$(id -u)" != "0" ]; then echo -e "\033[31mThis script requires superuser rights\033[0m" exit 0