|
You could, when you mail the file, move it to file.old and then in the next run, if there is a file.old, compare it to the new file that is just made. If they are the same, don't mail it. If they are different, add the new changes to the file.old and send/mail the new changes and then move the new one to file.old. This way, you don't lose any info that needs to be corrected, the users will be getting data that is new.
Once you have a run with no changes (zero bytes), you could remove file.old for future runs.
|