Scheduling alerts

After you have created the alert, you must schedule the alert to run using the Job Scheduler. See Job Scheduler.

Assign each alert task to a scheduler, which is the process that performs task runs. Schedulers can be unique and individually named. Schedulers are run separately from the application server. By default, the scheduler is not named and runs all tasks without a Task Affinity value.

Alert parameters

After you have created and submitted the schedule, you must specify the alert parameters by selecting the alert type. If the alert type is query, the alert type is the only parameter that is required for scheduling the alert. If the alert type is rowsource, define the additional parameter values if parameters are defined in the related Java class.

For example, the Late-Left Early Alert with related class com.workbrain.app.wbalert.source.TimeCodeAlertSource requires three parameters: time code, minimum minutes, and work date. By specifying these parameters in the scheduled task parameters, the logic for various conditions can be created.

Example 1

In this example, an alert is sent to the recipients if records with the LATE or LE (Left Early) time codes with duration of at least 5 minutes are found today:

  • Time code: LATE, LE
  • Duration: 5 minutes
  • Work Date: Today

Example 2

In this example, an alert is sent to the recipients if records with the UAT (Unallocated Time) time code with duration of at least 2 hours are found today:

  • Time code: UAT
  • Duration: 120 minutes
  • Work Date: Today