My AI cron job looked cheap at 5 runs/day. At 96 runs/day it turned into 1,728 model calls
说明与用途
在测试中,AI 定时任务看似便宜,但在生产环境中,由于重试、轮询、多步骤链和多环境,模型调用次数激增至每天1728次,导致成本大幅上升。
问题
AI cron jobs that seem inexpensive in testing can explode in cost in production due to retries, polling, multi‑step chains, and multiple environments.
结果
Estimating cost by counting model calls per run, retries, and environments provides a realistic budget. Switching to flat‑rate compute removes surprise usage bills.
工作流
- Schedule cron every 15 minutes
- Fetch new records
- Call GPT‑5.4 for classification
- Call Claude Opus 4.6 for summarization
- Retry on timeout
- Poll downstream status
- Send output
- Repeat in dev, staging, and prod environments
证据
96 runs/day × 3 model calls/run × 2 retry multiplier × 3 environments = 1,728 calls/day
The expensive part of an AI cron job usually isn't the prompt.
- 记录日期: 2026-09-22T10:45:37.631Z