### New Cache dialog for scheduling

The dialog is displayed when you click the OK button in the New Cache dialog for selecting queries. It helps you to define the updating policy of the data caches created based on the selected queries.

This dialog contains the tabs listed below. Set the settings in each tab according to your requirements.

- General tab
- Conditions tab
- Notification tab

Back

Goes back to the previous tab.

Next

Goes to the next tab.

Finish

Applies the settings.

Cancel

Cancels any settings and returns to the New Cache dialog for selecting queries.

Help

Displays the help document about this feature.

#### General tab

Before you can schedule a CRD task, you first need to configure the settings in this tab. See the tab.

##### Enter Parameters section

Specifies the parameter values for the listed query resources.

Select Query

Lists all the query resources you selected in the New Cache dialog for selecting queries. Select a query resource from the drop-down list and then specify the parameter values for it.

Enter Parameters

Specifies values of the parameters applied in the selected query resource. If the query resource does not have parameters, "No Parameter Needed" will be displayed here.

You may specify parameter values in these ways.

##### Cached Report Data Info section

Specifies the data cache information.

Name

Displays the name of the selected query resource. It is also used as the name of the new data cache.

Data Source

Displays the data source name.

Catalog

Displays the catalog information. The latest version is used by default.

Type

Displays the type of the query resource.

Priority

Specifies a priority level to the scheduling task. The priority levels are from 1 to 10 in ascending order of lowest priority to highest priority. By default this property is ignored unless server.properties is modified to set queue.policy not equal to 0.

##### Advanced section

Configures some advanced settings.

Connect to [Data Source Name]

Specifies the DB user and password with which you want to connect to the data source.

- Use the DB user and password defined in catalog
  If checked, the DB user and password defined in the catalog will be used.
- Use the DB User
  If checked, specify another DB user and password instead of the one defined in the catalog.

Add TaskListener to be Invoked

Enables you to call the Java application before/after viewing or when scheduling the task.

Enable Auto Recover Task

Specifies to enable the task to be auto recovered.

- Maximum Retry Times
  Specifies the maximum number of times in which to retry running the task in order to recover it.
- Retry Interval
  Specifies the interval between retries.
- Recreate All Results
  Specifies whether to recreate all or just the failed results.

#### Conditions tab

The Conditions tab allows you to specify the conditions for the task. It contains the following two sub tabs:

- Time tab
- Trigger tab

##### Time tab

The Time tab allows you to set settings for specifying the time for when a task is to be performed. See the tab.

Time Zone

Specifies the time zone.

Time Type

Specifies the time type of the task.

- Run this task immediately
  Performs the task as soon as you submit it.
  - Expires
    Specifies when the task expires.
    - Never
      The new task never expires.
    - At
      Specifies a specific time on a selected day when the task expires.
    - After
      Specifies a time period after that the task expires.
- Run this task at
  Specifies the time for when the task is to be performed once.
  - Date
    Specifies the date for when the task will be run. You can specify the date by clicking the calendar button .
  - Time
    Specifies the time for when the task will be run.
  - Run missed task upon Server restart
    Specifies to run missed tasks when you restart the server.
- Run this task periodically
  Specifies the time for when the task is to be performed on a repeated basis.
  - Do not start schedule until the report is requested
    This option is used to freeze the way of automatically performing the schedule and change it to the schedule being fired upon certain condition.

    If the option is not checked, the schedule will be performed automatically according to the time condition.

    If the option is checked, the schedule will be fired only upon the first report running request based on the query after each scheduled time.

  - Duration
    - Run after
      Specifies the start date and time of the period during which the task is to be performed on a repeated basis.
    - Run until
      Specifies the end date and time of the period during which the task is to be performed on a repeated basis.
  - Date
    Specifies the date for when a task is to be performed.
    - Daily
      Performs the task every one day, two days, etc., or every weekday (from Monday to Friday).
    - Weekly
      Performs the task every one week, two weeks, etc., and on Sunday, Monday, Tuesday, etc.
    - Monthly
      Performs the task on the first day, second day, etc. of every one month, two months, etc., or on the first Sunday, Monday, etc. of every one month, two months, etc.
  - Time
    Specifies the exact time for when a task is to be performed on a selected day.
    - At
      Specifies a specific time for when to perform a task on a selected day.
    - Hourly
      Performs the task every one hour, two hours, etc., at a certain minute on a selected day.
    - Minutely
      Performs the task every one minute, two minutes, etc.
  - Expires
    Specifies the expiration time for how long to keep the scheduled data caches.
    - Never
      The data caches will not expire.
    - At
      Specifies a specific time when the data caches will expire.
    - After
      Specifies a period of time after which the data caches will expire.
  - Run missed task upon server restart
    Specifies to run missed tasks when you restart the server.

##### Trigger tab

The Trigger tab allows you to set settings for specifying a trigger for the task. See the tab.

Select a trigger to bind

Specifies the trigger from the drop-down list for the task.

Create New

Creates a new trigger.

- Trigger Name
  Specifies the name of the trigger.
- Conflict Check
  Checks if the name has been used for another trigger.
- Description
  Specifies the description of the trigger (if required).
- OK
  Creates the trigger with the specified information.
- Cancel
  Cancels the trigger creating process.

Logic with time condition

Specifies the logic between time condition and trigger condition.

- Trigger Only
  Performs the task only when the trigger fires.
- Trigger and Time Condition
  Performs the task when both time condition and trigger condition are ready.

  Notes:

  - No matter which condition is ready, the task can only be performed when its counterpart is ready.
  - If you specify the task to be performed at a specific time, you must check the checkbox Run missed task upon Server restart, otherwise the task will be regarded as expired and will be deleted when the time condition is ready before the trigger condition.
- Time Condition after Trigger
  Performs a task when both the time condition and the trigger condition are ready. The trigger condition must be ready before the time condition. If the time condition is ready before the trigger condition, the task will be regarded as expired and will be deleted.
- Time Condition or Trigger
  Performs the task when either the time condition or the trigger condition is ready.

#### Notification tab

The Notification tab allows you to notify someone by e-mail when a task has finished running, regardless of whether it was successful or unsuccessful. See the tab.

When task is successful

Specifies to send an e-mail when the task is successful.

When task fails

Specifies to send an e-mail when the task is unsuccessful.

To

Specifies the address you want to send the e-mail to.

Cc

Specifies the address you want to copy to.

Bcc

Specifies the address you want to secretly copy to.

Subject

Specifies the subject of the e-mail.

Comments

Specifies the contents of the mail or comments to the contents.

###### Related topics:

- Managing cached report data