Creating a custom schedule for Visual Queries

To create a custom schedule to run the Visual Queries that are saved with alerting enabled, use a UNIX C cron expression. The default schedule to run these Visual Queries is once every 24 hours, at 00:00 hours according to the server time.

About this task

You can create a custom schedule in the AlertScheduleExpression property. The AlertScheduleExpression property requires a value in UNIX C cron expression format.

With the property AlertScheduleExpression, you can override the default daily schedule. By default, this property is not enabled. If the property is enabled, whenever the value of the expression matches the current date and time, i2 Analyze runs the Visual Queries that are saved with alerting enabled. For more information, see UNIX cron format.

When you enable the property AlertScheduleExpression, its value overrides the value of the default property, AlertScheduleTimeOfDay. For more information about AlertScheduleTimeOfDay, see Changing the daily schedule for Visual Queries.

If you follow this procedure in a deployment that provides high availability, you must complete each step on every Liberty server in your environment before you move to the next step.

Procedure

  1. Using a text editor, open the DiscoServerSettingsCommon.properties file. You can find this file in the following location: toolkit\configuration\fragments\opal-services\WEB-INF\classes.
  2. Uncomment AlertScheduleExpression.
    When you uncomment the AlertScheduleExpression property, the value for this property is used instead of the value for the AlertScheduleTimeOfDay property.
  3. Edit the value of AlertScheduleExpression.
    For example, the value 0,4,16,20 * * * schedules the Visual Queries that are saved with alerting enabled to run every 4 hours. A short way of expressing this schedule option is 0 */4 * * *.
  4. Save and close the file.
Redeploy i2 Analyze to update the application with your changes.
  1. In a command prompt, navigate to the toolkit\scripts directory.
  2. Stop Liberty:
    setup -t stopLiberty
  3. Update the i2 Analyze application:
    setup -t deployLiberty
  4. Start Liberty:
    setup -t startLiberty

What to do next

After you deploy i2 Analyze, the updated schedule is applied to run Visual Queries that are saved with alerting enabled.