Trigger

Description

The Trigger page lists all the job triggers that are available for the user, with information such as the name of the trigger, a brief description, the last and next run time. Only the owner who created the triggers can access them. The owner can edit and delete a trigger, as well as manually run a trigger in this page.

A trigger defines the following constraints:

  • Chainset and chain to run
  • Frequency or interval of the trigger
  • Calendars to decide when a trigger should fire at a particular month, date, day and/or time, as well as the time zone

Once a trigger has been set up and enabled, it will run automatically once the defined calendar’s date and time is reached, and will calculate the next run time. Jobs that are currently running (that is, in progress) is indicated by a green ring.

Add Trigger

A trigger determines the type of report to generate, when and how often a job is to be run. The user who create the trigger will own the trigger. Other users will not be able to view or edit it.

To add a trigger, click on the “Add” button at the upper corner of the page.

The “Add” page displays the trigger’s attributes.

In the “Properties” panel, enter a unique “Name” for the trigger, set the optional “Description” and “TimeZone” fields. Select the “Enabled” checkbox to enable the trigger to fire. The “TimeZone” field is by default set to the your system’s time zone. If you are unsure of the time zone set on your deployment server, then selecting an explicit time zone, rather than using the system default will ensure your trigger runs at the time you choose.

In the “Calendar Constraints” panel, select the appropriate constraint(s) by including or excluding it. Refer to Calender for more information on how to set calendar constraint.

In the “Frequency” panel, select the appropriate “Trigger Mode” and its corresponding fields.

In the “Job Properties” panel, select the appropriate chainset and chain, and set up “Parameters” field if it is required to pass any parameters into the chain.

Field Description Mandatory Input Type Constraints Default Value
Properties
Name Unique name assigned to the trigger. Y Text field Any text. Empty string
Description Brief description of the trigger. Y Text field Any text Empty string
TimeZone Time zone of the trigger to be run. N Drop-down list Select from list System default
Enabled Enable or disable trigger. Y Checkbox Enable or disable Enabled
Calendar Constraints
List of calendar constraints A list of calendar constraints defined in the Calendar page.
Each calendar constraint can be unselected (not used) or selected (to include or exclude).
Y Drop-down list Select from list Not selected
Frequency
Trigger Mode Select the trigger mode from the list of options:
- Run once only
- Run hourly
- Run daily
- Run weekly
- Run monthly
- Cron expression
Y Drop-down list Select from list Run daily
Field(s) for above selection Depending on the above selection, one or more fields may appear.
By default, the field “Time of Day” is shown, since Run daily is the default.
Y Varies Varies Varies
Job Properties
Chainset Selects the appropriate chainset for the report. Y Drop-down list Select from list Empty string
Chain Selects the appropriate chain from the chainset. Y Drop-down list Select from list Empty string
Parameters Defines any parameters required to be passed to the the chain. N Text field Any text Empty string

Click on the “Save” button to add the trigger to list. Click on the “Cancel” button to abort the action.

Below is an example how to set up the time zone and calendar constraints for a trigger to run a daily report at 8pm (Japan time) for each working day.

  • For TimeZone, select Japan time zone
  • For Calendar Constraint:
    • Add a Calendar called “Weekdays” and mark it as Included
    • To avoid running the report during public holidays, add a Calendar called “PublicHolidays” and mark it as Excluded
    • Add another Calendar called “OffpeakHours”, which is set to 8pm to 9pm, and mark it as Included

Refresh Trigger

Some job triggers may have just started running and some may have have completed. The manual “Refresh” button is available and is particularly useful to check the status of the triggers.

The “Refresh” button is found on the upper right corner of the page. Clicking on it reloads the status of the triggers.

Search

There is a cross-field search function for the list of triggers. It is located at the upper left corner of the page.

This provides an easy way to search through the list. It is case-insensitive and displays the triggers that have the entered search value in any of the values of the fields below:

  • Name
  • Owner
  • Description
  • Last Run
  • Next Run

Manually Run Trigger

Once a trigger has been set up and enabled, it will run automatically once the defined date and time is reached, and will calculate the next run time. When the trigger is not due to run, you can manually run the trigger by clicking on the “Run Now” icon under the “Actions” column corresponding to the trigger.

Do note that the icon is not available for jobs that are currently running (i.e., in progress). A job that is running is indicated by a green ring under the “In Progress” column corresponding to the trigger.

Edit Trigger

To modify an existing trigger, click on the “Edit” icon under the “Actions” column corresponding to the desired trigger.

The “Edit” page displays the selected trigger’s attributes. The same fields and constraints in Add Trigger are applied.

Click on the “Save” button to save the changes made. Clicking on the “Cancel” button aborts the action.

Delete Trigger

To delete an existing trigger, click on the “Delete” icon under the “Actions” column corresponding to the desired trigger.

There is an option to undo the deletion. A notification with an “Undo” button appears right after clicking on the “Delete” icon.

Upon clicking on the “Undo” button, the deleted trigger is restored and is added back to the list of triggers. Do note that the notification will disappear after five seconds.

Reset Trigger

A trigger marked as “In Progress” will not fire again until it has finished. The in progress state may be incorrect if one of the server nodes crashed while the job is running. If you are sure that it is not running, you can reset the status of the trigger by clicking on the “Edit” icon under the “Actions” column corresponding to the trigger. In “Job Status” panel, check the “Reset In Progress” checkbox.

Click on the “Save” button on the upper right corner of the page to save the change. Click on the “Cancel” button to abort the action.