You are here: Using Promodag Reports > Automating and scheduling tasks > Automating and scheduling the collection of data and other actions

Automating and scheduling the collection of data and other actions

Promodag Reports can be configured to import message tracking data and, for instance, purge old data by following these steps:

  1. Create a batch file.
  2. Add actions to the batch file to select what should be imported and retained in the database, to compact it etc.
  3. Schedule the batch file.
  4. Run the batch file.

In the following example, we are going to create and schedule a batch file to automate the data imports, delete data older than 365 days and compact the database.

Creating a batch file

In the Tools > Task Automation window, click the Create button to open the Edit batch file option.

Exploring available actions

Action Description
Database Specification Select a specific database to be used when the batch job runs.
Batch Trace File Location Select a location where trace files will be generated.
Create HTML TOC Create an HTML file including a TOC (Table of Content) with links to exported reports included in the batch.
Directory Connection Choose a specific directory connection to be used when the batch job runs.
Purge Imported Data Purge old messages from the database.
Import Directory Data Import or update the directory.
Import Message Tracking Data Import message tracking files.
Import IIS Data Import Internet Information Services log files.
Import Storage Size Data Import the size of mailboxes, mailbox folders, public folders, Exchange databases and the mailbox count per Exchange database.
Create Office 365 Message Tracking Files Create message tracking files by exporting data from Office 365.
Compact database Compact or shrink the database to reclaim unused disk space.

Adding actions to the batch file 

Note: By default, actions will be carried out on the last database opened, unless you specify which database must be used (action: Database specification).

You may decide that you only need one year of message tracking files in your database. Promodag Reports is able to clear automatically obsolete data.

 

Finally, click Save to save your batch file. It is recommended to give it a meaningful name, for example Daily_Data_Import. Click OK to return to the Task Automation window.

Scheduling the batch file

In the Task Automation window, select the batch you have just created and open the Schedule task option. In this example, we want to schedule the batch file 'Daily_Data_Import.prb'.

The new schedule is now displayed in the Schedule pane:

Running the batch file

The Windows Task Scheduler starts Promodag Reports and it processes actions included in the batch file. From now on, imports will be automatically carried out at the scheduled time.

Promodag Reports generates a trace file that contains information on what happened while the batch was running. Trace files can be automatically emailed.

 

You can directly enable, disable, run or end a scheduled task from the Tools > Task Automation window.