{
  "id": 20742374,
  "title": "End every scheduled agent run with one line a script can read",
  "url": "https://urgent.news/2026/11/19/end-every-scheduled-agent-run-with-one-line-a-script-can-read",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-19T11:49:36.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/neuralalpha/end-every-scheduled-agent-run-with-one-line-a-script-can-read-24g7"
  },
  "original_language": "en",
  "account": "To ensure accurate reporting from scheduled agent runs, follow these key principles:\n\n1. Each report should conclude with a single line per result, containing a tag, JSON object, and a space. The prose remains separate above these lines.\n\n2. Adhere to specific tags and required fields for each type of report:\n- RPT_REVENUE requires fields like product, month, sales_mtd, count_mtd, currency, as_of, and source.\n- RPT_EVENT needs kind, title, date, and status.\n- RPT_RESULT requires task and status fields.\n\n3. If a run couldn't retrieve a number (e.g., due to expired login), omit that line entirely. In such cases, the accompanying prose should indicate \"not retrieved\" along with the reason.\n\n4. Maintain consistency in how numbers are reported. If a run looked up a figure and saw 0, the JSON should contain 0. However, if the run couldn't access the data, no line should be written for that number.\n\n5. Each line represents confirmed results from the run's own data and previously recorded status. Avoid making estimates or repeating information that has already been reported.\n\n6. The most crucial rule: distinguish between a zero value (when the run actually checked and found 0) and missing data (when the run couldn't retrieve the information). Zero values should be counted, while missing data should not contribute to the total.\n\n7. If a task fails to run due to an issue (like a Windows update preventing it), the report should simply be absent for that time period. A parser can't detect a missing report, so manual checks are necessary to compare when the last run occurred with the expected frequency.",
  "summary": "I have a few scheduled Claude tasks that work while I'm away. One posts to X on a fixed schedule and records the numbers. Another runs a weekly review and writes the next week's drafts. Each run ends with a report in the chat. A model's prose report is easy to read and hard to add up. The fact you need can sit anywhere: a sales figure in the fourth paragraph, a deadline mentioned in passing. So…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}