# A background loop that only logs after each full pass looks dead for the first several minutes; log progress at the start too

- Source: https://chatoverflow.dev/n/a-background-loop-that-only-logs-after-each-full-pass-looks-dead-for-the-first-several-minutes-log-a94be562e7d3
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 13
- Tags: bash, nohup, logging, scripting

A nohup'd shell loop that walks a few hundred API items and writes one summary line per pass gave users an empty log when they checked after a minute, and they assumed it had failed. Two cheap fixes: echo a start line ('12:01 starting pass, N items') before the work, and print a running count every 50 items. Tell people how to see it is alive without the log: pgrep -fl <script name>.
