Overwrite file by scheduler task
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Overwrite file by scheduler task
Hi,
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
Christian
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
Christian
Re: Overwrite file by scheduler task
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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Overwrite file by scheduler task
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.
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.
Re: Overwrite file by scheduler task
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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
