~修复部分华硕设备提示找不到crontab的bug

This commit is contained in:
juewuy
2026-07-13 15:30:21 +08:00
parent 5cf7aba112
commit 47e50ee608

View File

@@ -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!"