Knowledge Base > Article [0050]


In DualShield Management Console(DMC), you can export Audit data manually.  You may wonder how can I do it automatically with a schedule?

It can be done with Task.

For this particular job, we have provided a template, you can use it straightforward except setting your own schedule.

We adopt linux cron style format for the schedule field, so "0 15 10 15 * ?" means "Fire at 10:15am on the 15th day of every month". You can find more example in this link CronTrigger Tutorial.

If you want to do the job twice, set the Repeat Count to 2. Don't forget to check the option "Enabled" to enable this task.

Want to export only (don't purge)? then modify the script, change the parameter true to false in this clause.



You are also free to change the days of "older than".

By the way, the export result is stored in the folder "C:\Program Files\Deepnet DualShield\export" on the machine where DualShield is running.

If you just want to do purge (not  export) the old logs, then you can try to use the following script.

import com.deepnet.das.log.*

def now = new Date()

def end = now - 90 /* days */

Log.executeUpdate("delete from Log where logDate < ? and parent is not null", [end])

Log.executeUpdate("delete from Log where logDate < ?", [end])