Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

enabled: false Silently Disabled Claude Code Scheduled Tasks

说明与用途

Claude Code 的定时任务可能因三种方式停止:未启动、运行中途死亡或槽被禁用。作者通过检查 Git 中的产物、自动重新启用被禁用的槽、将恢复限制为每次运行两篇文章,并重新排序任务以先拉取流量数据来实现可靠监控。

问题

Claude Code scheduled tasks can stop in three ways—never start, die mid‑run, or have the slot disabled—leading to missed content and unreliable monitoring.

结果

The new monitoring and task management approach reduced missed articles, eliminated false failure alerts, and ensured that disabled slots are re‑enabled daily.

工作流

  • 1. At each slot start, count articles already published that day and slots passed.
  • 2. If a slot is disabled (enabled:false), flip it to true and log the action.
  • 3. For article slots, first pull traffic numbers, then write the article; for stocking slots, write separate heartbeat files.
  • 4. Limit catch‑up to two articles per run to avoid extended runtimes.
  • 5. Monitor artifact creation in git; if missing, treat slot as failed.
  • 6. Adjust command syntax to use single commands with git -C and npm --prefix to avoid permission prompts.
  • 7. Widen artifact detection window to 180 minutes based on measured median times.

证据

Running Claude Code's scheduled tasks unattended, we found they stop three different ways.

来源

We capped the catch‑up at 2 articles per run, for three reasons: ... The longer one run takes, the higher the chance it dies mid‑run

来源

Now, at the start of the first slot each day, we list every scheduled task. If a writing slot is set to false, we flip it back to true and add one line to the report

来源

We widened the window to 180 minutes and the false alarms went away.

来源

  • 记录日期: 2026-10-27T05:26:14.464Z