feat: recurring schedules should be able to run indefinitely (currently hard-capped at 7 days, even with durable: true)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- cli
调研方向
The issue identifies recurring schedules created through /loop and cron_create, stored in ~/.commandcode/cron/jobs.json, and documents the current seven-day expiry. Start by tracing how recurring jobs are created and where their expiry is enforced; then check how durable affects job lifetime. Done means a durable recurring job continues firing until cron_delete removes it, while the default expiry for conversation-scoped tasks remains as described.
由索引模型根据 Issue 内容生成。
描述
Problem
Recurring scheduled tasks (/loop and cron_create) are hard-capped at seven days, and durable: true does not lift that cap — it only decouples the job from the conversation lifetime.
From the docs (https://commandcode.ai/docs/background-tasks#scheduled-tasks-and-loops):
Recurring tasks expire seven days after creation. A running fixed task gets one final fire at expiry; a self-paced loop stops when it reaches the limit. Re-create a task before expiry or use an external scheduler when it must run indefinitely.
So a job stored in ~/.commandcode/cron/jobs.json still silently stops firing after a week, even though it was created explicitly as a machine-level schedule. The only supported workaround today is an OS-level scheduler (launchd / cron / Task Scheduler) invoking cmd -p headlessly, which loses the conversation the job belongs to.
Why it matters
Long-lived schedules are the normal case, not the exception: a nightly dependency/security sweep, a weekly report, a daily "check this branch / PR / dashboard" task. A user who explicitly asks for a durable schedule reasonably expects it to survive the month, not just the week.
Other agents already offer this — e.g. Claude's scheduled tasks persist indefinitely — so the 7-day cap is the main thing that pushes users back onto an external scheduler.
Proposal (any one of these would solve it)
- Add an explicit lifetime to
cron_create, e.g.expires: "never"(orexpires_at,max_runs), honored for recurring jobs. - Or make
durable: trueimply no expiry, since those jobs already live outside the conversation in~/.commandcode/cron/jobs.json. - Or make it configurable, e.g.
{ "cron": { "recurringTtlDays": -1 } }insettings.json.
The behavior that matters: a durable recurring job keeps firing until it is explicitly removed with cron_delete. The expiry can stay as the default for conversation-scoped tasks, where it makes sense.
Workaround today
System scheduler plus headless mode:
cmd -p "<prompt>" # with COMMAND_CODE_API_KEY exported
This works, but it cannot resume the conversation the schedule was created in, and it duplicates the job outside Command Code.
- 主要语言
- 没有语言数据
- 星标
- 4.2k
- 派生
- 377
- 平均合并
- 1 天 17 分钟
- 30 天内合并 PR
- 7
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CommandCodeAI/command-code 的其他 Issue
-
Provider /v1/messages rejects role:"system" inside messages[] — Claude Code ≥ 2.1.154 incompatible未关闭
难度 2/5 1-3 小时 新手友好度 75/100
CommandCodeAI/command-code#1085 ·
维护者通常 1 天内回复
-
Feature request: auto-reconnect remote control (/rc) after restart可能已有人在做 @aliarain 于 20 天前认领。 未关闭p2
难度 2/5 1-3 小时 新手友好度 85/100
CommandCodeAI/command-code#992 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
CommandCodeAI/command-code#933 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
CommandCodeAI/command-code#855 ·
维护者通常 1 天内回复
-
grep tool passes empty file type to ripgrep可能已有人在做 @ahmadbilaldev 于 19 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
CommandCodeAI/command-code#655 · 1 条评论 ·
维护者通常 1 天内回复
查看 CommandCodeAI/command-code 的全部 Issue
相似的 Issue
-
nb stats: the high-error-rate anomaly and the error-causes line give different cause splits for the same errors可能已有人在做 @jeanibarz 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 89/100
jeanibarz/agent-notebook#418 ·
维护者通常 1 天内回复
-
[Bug]: graphify query loads every language extractor just for _file_stem (about 34 ms per call)可能已有人在做 @rohit-jsfreaky 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
Graphify-Labs/graphify#5160 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
WenyuChiou/agent-board#1345 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 82/100
-
bug triage
难度 2/5 1-3 小时 新手友好度 66/100
wavetermdev/waveterm#3587 ·
维护者通常 1 天内回复