cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

diasable jobs history (CronJobHistoryModel)

Former Member
0 Kudos
396

Hello,

Is there a possibility to easily switch off CronJob history entries which are created on every run ? I am curious about switching it off globally or for specific jobs.

Best regards,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello, Thanks for your previous answers, but I have probably asked my question in wrong way :( The thing I would like to switch off is CronJobHistory entities which are :

         <relation code="CronJobHistoryRelation" autocreate="true" generate="true" localized="false">
                 <sourceElement qualifier="cronJob" type="CronJob" cardinality="one">
                         <description>cronjob</description>
                         <modifiers read="true" write="true" search="true"/>
                 </sourceElement>
                 <targetElement qualifier="cronJobHistoryEntries" type="CronJobHistory" cardinality="many" ordered="true" collectiontype="list">
                         <description>history entries</description>
                         <modifiers read="true" write="true" search="true" partof="true"/>    
                 </targetElement>
         </relation>

I have found it in Job jalo class in execute() method -> cronJob.createCronJobHistory(), but can not see there any way to disable it. We got few Job which are being executed every 2minutes (Sap orders etc) and those objects (CronJobHistory table 'cronjobhistories' ) are growing enormously.

Of course I can use hybris MaintenanceCleanupStrategy, but that is not the point 🙂

Former Member
0 Kudos

Hi Przemysław.

After selecting a CronJob in hAC under the Log section you have options to disable logging to database and to file.

Regards, Kamil.

Ask a Question