on 2018 Sep 24 2:30 PM
Hi Team,
I have requirement where I want to export the bunch of data from the selected types. I have written the scripts (separate script for each type) and now I want to write a cronjob which should execute these export scripts one-by-one.
Let me know the best practice and solution for this.
Request clarification before answering.
Hi ,
You can try using export API (ImpExExportCronjob).
https://help.hybris.com/1808/hcd/8361ab18bb434ba3abbac01e3c1c46c8.html
Please check this OOTB class de.hybris.platform.impex.jalo.ImpExExportTest for your reference.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Just wondering if you got any solution for this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can either have one export script with all your types in one cronjob, or you can have multiple export scripts and multiple cronjobs, as the export can only have one configured export script.
If you combine all your export scripts into one, that should be fine (as long as they are all different item types), since the export will generate one CSV file for each type.
First you create the ImpExMedia to contain your export script:
INSERT_UPDATE ImpExMedia;code[unique=true];mime;realfilename;@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator][forceWrite=true]
;OrderExportImpex;application/octet-stream;order-data-export.impex;$jarResource/order-data-export.impex
Then you assign the ImpExMedia to your ExportCronjob
INSERT_UPDATE ImpExExportCronJob;code[unique=true];job(code);jobMedia(code);singleFile;sessionLanguage(isoCode)[default=en]
;OrderExportCronJob;ImpEx-Export;OrderExportImpex;true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.