Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#5647 by chricken
06 Feb 2018, 14:42

I have an issue with a scheduler task here:
I am using the scheduler task 'product export', which works fine now.
I get a file, which contains the expected data. Unfortunately the data is being appended to the existing file.
Is there any way to force the script to overwrite the file?

My secondbest idea would be to delete the file a few minutes before it is being written. That'd be okay in my workflow but it is not really clean and beautyful.

Thank you, regards
#5650 by aimeos
07 Feb 2018, 10:57
Overwriting the files is not the best idea because this can lead to inconsistencies if they are read and updated at the same time. What would be possible is to add a timestamp to each file so they are not appended any more.
#5660 by chricken
09 Feb 2018, 05:54
Thanks for your answer,
that's a good objection and i understand, why that is not standard behaviour.

Therefore I already solved that problem by having a second cronjob, which deletes the old file one hour before the new one is generated. For my special usecase, this works perfectly.
#5662 by aimeos
09 Feb 2018, 12:59
The next version will contain the date by default in the file name and the file name template will be configurable so you can decide about the naming of the exported files.