~优化定时任务日志记录

This commit is contained in:
juewuy
2026-02-02 20:04:53 +08:00
parent 0b1d297622
commit 9cad2c21e8
3 changed files with 9 additions and 4 deletions

View File

@@ -14,7 +14,11 @@ task_logger(){
[ "$task_push" = 1 ] && push= || push=off
[ -n "$2" -a "$2" != 0 ] && echo -e "\033[$2m$1\033[0m"
[ "$3" = 'off' ] && push=off
echo "$1" |grep -qE '(每隔|时每)([1-9]|[1-9][0-9])分钟' || logger "$1" 0 "$push"
echo "$1" |grep -qE '(每隔|时每)([1-9]|[1-9][0-9])分钟' && {
push=off
cover=on
}
logger "$1" 0 "$push" "$cover"
}
#任务命令