Feature:Add Scheduled tasks - #73
Open
mengnankkkk wants to merge 2 commits into
Open
Conversation
- add scheduled task CRUD, dispatch, run history, and owner-based run locking - validate schedule expressions, positive intervals, and timezone-aware next runs - add scheduled task management frontend page - append scheduled task tables to data_source.sql
Contributor
|
大的PR,加一下设计思路以作记录 |
lzq986
reviewed
Aug 5, 2026
| @RequiredArgsConstructor | ||
| public class ScheduledAgentTaskRunner { | ||
|
|
||
| private static final Duration LOCK_DURATION = Duration.ofMinutes(30); |
Contributor
There was a problem hiding this comment.
Agent 任务一旦跑超过 30 分钟,锁过期,下一个 tick 另一个实例就抢走锁 → 同一任务并发执行两次,对一个会执行 SQL、生成报告的 Agent 来说就是副作用重复。
把常量改成配置项,部署者按自己最坏任务时长调
| } | ||
|
|
||
| private String buildPrompt(ScheduledAgentTask task) { | ||
| return task.getPrompt() + "\n\n定时任务执行要求:如果信息不足或需要用户确认,请直接说明无法完成,不要调用 ask_user 反问用户。"; |
Contributor
There was a problem hiding this comment.
prompt无法限制的。看看是否改造ask_user工具,加个配置项,如果是定时任务调了这个就不要抛出异常,因为目前抛出异常是为了框架能进行人工接入。
或者看看有无别的更好的办法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.