feat: 添加搜索页面缓存清理任务到可用任务列表,并调整首次执行基准时间 #161
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
这个 pull 请求为 Telegram 机器人中的计划任务管理功能引入了改进,具体增强了任务可见性和执行逻辑。主要变化包括更新帮助信息以列出所有可用任务,并优化确定计划任务何时运行的逻辑,确保新任务在首次检查时不会被遗漏。
计划器帮助信息改进:
ScheduledTaskController.cs中的/scheduler history帮助信息,将SearchPageCacheCleanup作为可用任务列出,使用户更清楚哪些任务可以管理。任务执行逻辑增强:
SchedulerService.cs中计划任务的基线计算,以便如果任务从未被执行过,其第一个符合条件的运行时间会设置在当前时间稍早(使用检查间隔或默认一分钟)。这可以防止新任务在初次执行检查时被跳过。