Jump to content
We've recently updated our Privacy Statement, available here ×
  • Changing the default time and frequency of auditing archive and purge


    vchiem
    • Features: JasperReports Server Version: v7.1 Product: JasperReports® Server

    Issue:

    After enabling the audit logging feature, we noticed that the audit archiving runs every day at 1 am and the audit purging runs at 3am. 

    We would like to change this so that it runs at a different time of the day. How can this be configured ?

     


     

    Solution:

    Configuring the audit archiving options can be done by editing the ./jasperserver-pro/WEB-INF/applicationContext-audit.xml file.

    Locate the auditEventArchiverTrigger bean and modify the cron expression. 

    Here is an example of a cron expression that will run the audit event archive at 2:10 pm every day :

        <bean id="auditEventArchiverTrigger" class="com.jaspersoft.jasperserver.api.engine.scheduling.quartz.JSCronTriggerBean">
            <property name="jobDetail" ref="auditEventArchiverJob"/>
            <property name="cronExpression" value="0 10 14 * * ?"/>
        </bean>

    Similarly, if you want to modify the time and frequency for the audit event purge, locate the auditEventPurgerTrigger bean : 

        <bean id="auditEventPurgerTrigger" class="com.jaspersoft.jasperserver.api.engine.scheduling.quartz.JSCronTriggerBean">
            <property name="jobDetail" ref="auditEventPurgerJob"/>
            <property name="cronExpression" value="0 0 3 * * ?"/>
        </bean>

    Note that a restart of the TIBCO JasperReports® Server is required for any changes to take effect.

    To understand the cron expression formats, there is a Format table in the Quartz documentation (See Reference link under 'Related Articles' below).

    Extract of Format table from Quartz reference:

    cronexpression.png.c38691bd4d4f7287aca04a7beb7c70de.png

     

    Related Articles:

    http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...