From 47e50ee608b30c3a21587155e7e37aa5c48289c8 Mon Sep 17 00:00:00 2001 From: juewuy Date: Mon, 13 Jul 2026 15:30:21 +0800 Subject: [PATCH] =?UTF-8?q?~=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E5=8D=8E?= =?UTF-8?q?=E7=A1=95=E8=AE=BE=E5=A4=87=E6=8F=90=E7=A4=BA=E6=89=BE=E4=B8=8D?= =?UTF-8?q?=E5=88=B0crontab=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/libs/set_cron.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/libs/set_cron.sh b/scripts/libs/set_cron.sh index 872166a1..a586d1d2 100644 --- a/scripts/libs/set_cron.sh +++ b/scripts/libs/set_cron.sh @@ -11,7 +11,7 @@ touch "$tmpcron" cronadd() { #定时任务工具 if crontab -h 2>&1 | grep -q '\-l'; then crontab "$1" - elif [ -f "$crondir/$USER" ];then + elif [ -w "$crondir" ];then cat "$1" >"$crondir"/"$USER" && cru a REFRESH "0 0 1 1 * /bin/true" 2>/dev/null else echo "找不到可用的crond或者crontab应用!No available crond or crontab application can be found!"