<div dir="ltr">I came to this same conclusion after thinking about this some more yesterday. It makes perfect sense that cron would buffer the output until the process it sees as creating it had ended. I was having a &quot;forest for the trees&quot; moment. Since the error states that create messages happen so far apart I was wrongly thinking of them as different invocations, even though I knew they weren&#39;t.<div>

<br></div><div>QH</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 19, 2014 at 6:07 PM, David L. Anselmi <span dir="ltr">&lt;<a href="mailto:anselmi@anselmi.us" target="_blank">anselmi@anselmi.us</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">Quentin Hartman wrote:<br>
&gt;<br>
&gt; Interestingly, all of the &quot;tee&quot; output seems to be buffered until cron<br>
&gt; kills the script or the script dies for some other reason.<br>
<br>
</div>So you mean the stdout data that cron emails you?<br>
<br>
So (for Vixie cron anyway) &quot;any  output  is  mailed  to  the  owner&quot;.  You&#39;d expect that to be one<br>
email, right?  Not one per line or some other subset.  So the mail can&#39;t be sent until the script ends.<br>
<br>
The behavior you see is because your script runs for a really long time.  I don&#39;t think the while<br>
has anything to do with it.  Does that make sense?<br>
<br>
If you want more mail, the answer is to send mail yourself.<br>
<br>
If you want mail for each error you break the loop, send the mail, and go back to looping again.<br>
<br>
If you want mail for each loop, you send the mail as part of your commands.<br>
<br>
Or, if you know you&#39;re running every minute (or 5, or ...), take out the loop and schedule the cron<br>
appropriately.  And only produce output for cases where you want a mail.<br>
<br>
Dave<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br>
</div></div></blockquote></div><br></div>