in reply to Output from a cron job should...

Howdy!

If I read you correctly (and CODE tags around the code would make that so much easier), you want the log file to have only one set of output from the END block regardless of the number of runs accumulated there.

That's not going to be easy, especially if you are just printing to STDOUT, since you won't be able to seek to the right place to insert the desired output, and all that. Perhaps you need to have two output files. One for the first part, that you keep appending to, and another for the "END" data that you overwrite each time.

yours,
Michael