给 Grok Bot 定时例程加廉价前置检查以省额度
作者演示在定时任务前加脚本比对变化,只有输入真变了才调用模型,并用预算上限和 JSON 日志控制成本。
It is becoming f*cking dangerous Most people wire Grok Bot routines to a timer and let it burn the pool for nothing The ones that actually stay inside the limit put a cheap check in front of the model Clock fires. Shell reads one hash or count. Claude only starts when the thing actually moved. 19 out of 20 ticks die in the script and never touch a token One setup shows the whole loop: - cron or scheduler wakes the check - http://changed.sh compares the last value and exits 0 only on a real change - claude --bare -p runs headless only after that - --max-budget-usd caps the run - JSON log writes the cost No 5-minute polling. No empty conversations. Just the model thinking when the input actually changed The trick is the gate. Same job, separate cost. The routine keeps ticking. The bill doesn’t If your Bot keeps waking up to report that nothing happened, this is the kind of filter that stops it from eating the week for free
这条是引用着另一条写的:x.com/aleiahlock/status/2113965935946027159