fix(cron): prevent concurrent cron execution and queue properly

- Add queue-based cron processing in nonInteractiveCli for sequential execution
- Block cron processing while user prompt is active in Session
- Drain cron queue after prompt completion to process queued jobs
- Reduce recurring task auto-expiry from 7 days to 3 days

This fixes race conditions where cron jobs could fire during active prompts
and ensures cron prompts are processed sequentially.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
tanzhenxin 2026-03-30 19:49:17 +08:00
parent dbc86e7672
commit 05f38543cf
6 changed files with 32 additions and 15 deletions

1
package-lock.json generated
View file

@ -26,6 +26,7 @@
"@types/uuid": "^10.0.0",
"@vitest/coverage-v8": "^3.1.1",
"@vitest/eslint-plugin": "^1.3.4",
"@xterm/headless": "^5.5.0",
"@xterm/xterm": "^6.0.0",
"cross-env": "^7.0.3",
"esbuild": "^0.25.0",