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