```
feat(scheduler): 添加定时任务功能并集成前端配置界面 - 引入 node-cron 依赖以支持定时任务调度 - 新增定时任务相关 API 接口:获取配置、更新配置、查询状态、手动触发任务 - 前端新增“定时任务”标签页,支持 Cron 表达式配置与友好时间展示 - 支持通过 Web 界面启用/禁用定时任务、设置执行计划和金额阈值 - 定时任务可自动采集数据并发送邮件报告,无需重启服务即可生效新配置 - 优化配置保存逻辑,避免敏感信息泄露 ```
This commit is contained in:
21
config.example.json
Normal file
21
config.example.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"scheduler": {
|
||||
"enabled": true,
|
||||
"cronTime": "0 9 * * *",
|
||||
"threshold": 100000,
|
||||
"description": "每天9点采集大于10亿的项目",
|
||||
"timeRange": "thisMonth",
|
||||
"pushRules": {
|
||||
"urgentThreshold": 500000,
|
||||
"urgentPush": false,
|
||||
"summaryPush": true
|
||||
}
|
||||
},
|
||||
"email": {
|
||||
"smtpHost": "smtp.example.com",
|
||||
"smtpPort": 587,
|
||||
"smtpUser": "your-email@example.com",
|
||||
"smtpPass": "your-password",
|
||||
"recipients": "recipient1@example.com,recipient2@example.com"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user