Scheduling Automated Reporting

The Watson™ Explorer Engine administration tool makes it easy to schedule running existing reports at specific intervals and sending the report results to a specified email address. Automatically running reports requires that the Watson Explorer Engine Scheduler service is running, which you can start either manually or automatically, by integrating Watson Explorer Engine startup into your system's boot process.

Starting the scheduler service manually is done from the same screen in the Watson Explorer Engine administration tool that you use to schedule report execution and other scheduled tasks. To view this screen, click the drop-down menu beside the Management entry in the Watson Explorer Engine administration tool header, and select Services. You can also simply click the Management header and select Services from the left-hand navigation menu.

If this screen displays a grey banner that says Service is not running, click the start button to start the scheduler. Information about the current time, software version, and the period of time for which the scheduler has been running displays, as shown in Figure 1.

Figure 1. The Scheduler Service Tab

Next, click Add Scheduled Task to add a new scheduled task, select Build and email a report from the scrollable Add Scheduled Task dialog, as shown in Figure 1, and click Add. A screen like the one shown in Figure 2 displays.

Figure 2. Defining Report Execution Attributes

You must complete all required fields:

  • Report Name: The name of the report to build and email.
  • Users: Those to whom the report should be mailed.
  • Time Frame: The time frame over which to build the report. The default time frame value is Yesterday, but you can also select Today, Last Week, and Custom from the drop-down time frame list. Selecting Custom enables you to specify a Custom Start Time and Custom End Time, both expressed as a date that you can customize by selecting the month, day, and year.
    Tip: Application reports about activity on busy sites can take a long time to run, even if the system is not heavily loaded at the time that the report is being run. If necessary, you can use the Execution section of this screen to set limits on the amount of CPU time and memory that can be used while running the report. You can also set an absolute limit on the total amount of time for which the report can run. These options are found under Execution.
  • Email As: The format for the email. You may choose between the Printer-Friendly, CSV, and Excel output format that were discussed in the previous section.
  • Run as user: The username used to run the task. This required field is found in the Execution section.

For the purposes of this tutorial, enter tutorial-app-report as the name of the report to run, select your Watson Explorer Engine login as the name of the user to receive and run the report, select Yesterday as the time frame, and select Excel as the type of email to send.

After setting all of these values appropriately, click OK to save this information. A screen like the one shown in Figure 3 displays.

Figure 3. A Configured Reporting Task Ready for Scheduling

In the Conditions section of this screen, click Add Scheduled Time and select when you want to run this report from the dialog that displays. Your choices are At boot, Daily, Fixed intervals, Fixed intervals with bounds (for example, only after or before a certain time of day), Fixed intervals with start time (for example, every hour after midnight), Specific time on certain dates (daily, but only on certain days of the month), and Specific time on certain days (daily, but only on certain days of the week).

For the purposes of this tutorial, select Daily as the scheduled time for report execution. Click Add to add the selected time or interval. Depending on the time or interval that you select, a screen like the one shown in Figure 4 displays, in which you can set the specifics of the time or date interval that you selected.

Figure 4. Setting the Scheduled Time for Report Execution

Given that we have selected Yesterday as the time frame for the report that we are scheduling, enter a time of 12:30 AM as the time for report execution. As mentioned previously, activity reports for popular applications can take a long time to run, depending on the number of report items that they contain. Scheduling application reports at off-peak times is wise. Depending on the location of the users of your applications, it may be difficult to pick a time when your application is not in use, but you can always add a report item such as Queries per project by time to help identify an appropriate time for running reports.

Once you have set the time or interval, click OK. A summary screen displays that provides information about the next times/dates at which your report will run, and the details of its execution.

At this point, you can click run now to have the scheduler execute the report immediately, so that you can verify that you specified the correct execution parameters. Assuming that you have, Watson Explorer Engine will run the tutorial-app-report for your application, summarize data about its use yesterday, and mail that information to you as an email attachment in Excel format.

You can use the Reporting tab in the Management > Services tab in the Watson Explorer Engine administration tool to view the status of any enqueued reports.

To proceed to the final, summary section of this tutorial, click Summary.