From 47594a9042fca8046d639a4020c8ea9e71b96f6a Mon Sep 17 00:00:00 2001 From: chengxl Date: Mon, 29 Dec 2025 14:57:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/command/agreeReviewReminder.sh | 23 +++++++++++++++++++++ application/command/inviteReviewReminder.sh | 23 +++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100755 application/command/agreeReviewReminder.sh create mode 100755 application/command/inviteReviewReminder.sh diff --git a/application/command/agreeReviewReminder.sh b/application/command/agreeReviewReminder.sh new file mode 100755 index 00000000..346d4f76 --- /dev/null +++ b/application/command/agreeReviewReminder.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# agreeReviewReminder.sh +# 批量处理文章审稿阶段-同意审稿超过十天/十二天发送提醒邮件 +# 调用接口获取需要提醒的审稿人记录 +# 此文件需要在crontab中配置每天【凌晨0:30】运行一次 +# @author chengxiaoling +# @date 2025-12-29 + +# 基础配置 +DOMAIN="http://api.tmrjournals.com/public/index.php/" # 项目域名 +# DOMAIN="http://zmzm.tougao.dev.com" # 项目域名 +ROUTE="/api/Cronreview/agreeReminder" # 控制器路由 +BASE_PATH=$(cd `dirname $0`; pwd) +# 如果日志目录不存在则创建 +logDir=${BASE_PATH}/log/$(date "+%Y")/$(date "+%m") +if [ ! -d $logDir ];then + mkdir -p $logDir +fi + +# 执行请求并记录日志 +curl "${DOMAIN}${ROUTE}" >> ${logDir}/agreeReminder_$(date "+%Y%m%d").log 2>&1 +# 添加时间戳 +echo "[$(date '+%Y-%m-%d %H:%M:%S')] 定时任务已执行" >> ${logDir}/agreeReminder_$(date "+%Y%m%d").log \ No newline at end of file diff --git a/application/command/inviteReviewReminder.sh b/application/command/inviteReviewReminder.sh new file mode 100755 index 00000000..b4ac4715 --- /dev/null +++ b/application/command/inviteReviewReminder.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# inviteReviewReminder.sh +# 批量处理文章审稿阶段-邀请审稿超过三天/五天发送提醒邮件 +# 调用接口获取需要提醒的审稿人记录 +# 此文件需要在crontab中配置每天【凌晨0:30】运行一次 +# @author chengxiaoling +# @date 2025-12-29 + +# 基础配置 +DOMAIN="http://api.tmrjournals.com/public/index.php/" # 项目域名 +# DOMAIN="http://zmzm.tougao.dev.com" # 项目域名 +ROUTE="/api/Cronreview/inviteReminder" # 控制器路由 +BASE_PATH=$(cd `dirname $0`; pwd) +# 如果日志目录不存在则创建 +logDir=${BASE_PATH}/log/$(date "+%Y")/$(date "+%m") +if [ ! -d $logDir ];then + mkdir -p $logDir +fi + +# 执行请求并记录日志 +curl "${DOMAIN}${ROUTE}" >> ${logDir}/inviteReminder_$(date "+%Y%m%d").log 2>&1 +# 添加时间戳 +echo "[$(date '+%Y-%m-%d %H:%M:%S')] 定时任务已执行" >> ${logDir}/inviteReminder_$(date "+%Y%m%d").log \ No newline at end of file