展示HN:Crnd – 为脚本和人工智能代理构建的Cron守护进程

3作者: ysm06223 天前原帖
我一直在使用 cron,但每个现代替代品都让我在仪表盘上点击或写 50 行 YAML。因此,我构建了 crnd(发音为“crowned”)——这只是一个命令行工具,按照你的指令执行。 主要特点:没有提示,没有交互式向导。只有可以在脚本中运行的命令。 `crnd schedule -n backup -s "0 2 * * *" -- rsync -a ~/docs ~/backup` 就这样。任务保存在一个热重载的 toml 文件中。守护进程作为一个真实的操作系统进程运行,而不是某种容器抽象。 还支持一次性调度任务,这是 cron 无法做到的: `crnd schedule -n reminder -i 5m -- say "stretch break"` 主要是因为我在使用 AI 编码代理,而它们总是无法处理交互式提示。现在它们可以直接解析 --json 输出并调度任务。 没有云,没有 Docker,没有账户。只有一个单一的二进制文件。 <a href="https://github.com/ysm-dev/crnd" rel="nofollow">https://github.com/ysm-dev/crnd</a> 非常希望得到反馈,特别是如果你正在使用脚本或代理自动化某些事情。
查看原文
Been using cron forever but every modern alternative wants me to click through dashboards or write 50 lines of yaml. So I built crnd (pronounced &quot;crowned&quot;) - just a CLI that does what you tell it.<p>Main thing: no prompts, no interactive wizards. Just commands that work in scripts.<p>`crnd schedule -n backup -s &quot;0 2 * * *&quot; -- rsync -a ~&#x2F;docs ~&#x2F;backup`<p>Thats it. Jobs live in a toml file that hot-reloads. Daemon runs as a real OS process, not some container abstraction.<p>Also supports one-time scheduled jobs which cron cant do: `crnd schedule -n reminder -i 5m -- say &quot;stretch break&quot;`<p>Built it mainly because I&#x27;m using AI coding agents and they kept choking on interactive prompts. Now they can just parse --json output and schedule stuff.<p>No cloud, no docker, no account. Just a single binary.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ysm-dev&#x2F;crnd" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ysm-dev&#x2F;crnd</a><p>Would love feedback - especially if youre automating things with scripts or agents.