{
  "id": 7751731,
  "title": "A Scheduled Job That Works and Never Runs",
  "url": "https://urgent.news/2026/09/16/a-scheduled-job-that-works-and-never-runs",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-16T09:08:29.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/quintetkit/a-scheduled-job-that-works-and-never-runs-10f8"
  },
  "original_language": "en",
  "account": "The story revolves around a daily publishing job that was rebuilt three times due to failure in different environments. Initially, the loop script ran in /tmp with nohup, but it failed when the machine restarted as nohup does not survive a reboot. The second version used launchd with KeepAlive, but it encountered issues with the PATH, as launchd had a limited PATH compared to the user's shell. The third version fixed the PATH issue but discovered that the process was being suspended, which prevented the loop from advancing. The final version utilized launchctl to schedule the job, ensuring it ran only once, and survived multiple suspends and a reboot. The author emphasizes the importance of testing a job in its intended environment before assuming it works, as testing in a different environment may overlook environment-specific failure modes.",
  "summary": "I have a job that publishes one article a day. Over four days I rebuilt its scheduling three times, and each rebuild fixed a real failure that the previous version could not have shown me. Every version passed the test I gave it. The test was always \"does it work now\", never \"does it work where it is going to live\". Version 1: a loop in /tmp nohup bash /tmp/daily-loop.sh & It ran. It published.…",
  "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."
}