refactor(scheduler): 优化定时任务配置和时间处理

- 支持CHECK_INTERVAL_HOURS设置为0以禁用密钥检查任务
- 调整日志清理任务执行时间从凌晨3点改为0点
- 移除timezone依赖,使用本地时间处理
- 优化代码格式和导入顺序
- 为配置编辑器添加CHECK_INTERVAL_HOURS输入验证
- 改进UI布局,为关键配置项添加警告提示
This commit is contained in:
snaily
2025-09-18 05:14:43 +08:00
parent 79f47c315e
commit 78f38cc981
5 changed files with 96 additions and 78 deletions
+18
View File
@@ -104,6 +104,24 @@ document.addEventListener("DOMContentLoaded", function () {
});
}
// 检查间隔小时数输入控制
const checkIntervalInput = document.getElementById("CHECK_INTERVAL_HOURS");
if (checkIntervalInput) {
checkIntervalInput.addEventListener("input", function () {
let value = parseFloat(this.value);
if (isNaN(value) || value < 0) {
this.value = 0;
}
});
checkIntervalInput.addEventListener("change", function () {
let value = parseFloat(this.value);
if (isNaN(value) || value < 0) {
this.value = 0;
}
});
}
// Toggle switch events
const toggleSwitches = document.querySelectorAll(".toggle-switch");
toggleSwitches.forEach((toggleSwitch) => {