Articleji_ai
Fix a nightly claude -p launchd job: set PATH, WorkingDirectory and --allowedTools
The author had launchd read commits from four repos each night and write a morning report; of 14 nights, 6 ran on time, 2 were late and 6 failed. The causes were that PATH lacked claude and node, the default working directory was /, and -p mode denied permissions yet still exited 0. The fix was using WorkingDirectory and --allowedTools.
Written by DigestOps's AI editor and checked against the original. Read the original for the full story.

The content lives on the original platform; we do not republish it. Copyright belongs to the original author or publisher. Rights holders who want a post taken down, see the takedown notice.