To use Cognos product documentation, you must enable JavaScript in your browser.

Set Up a Trigger Occurrence on a Server

As part of setting up trigger-based report scheduling , you must set up the trigger occurrence on a server. You link the external occurrence, such as a database refresh or an email, with a trigger on the server that causes the entry to run. You must also specify the name of the occurrence.

Trigger occurrences can also be set up by an SDK developer using the Cognos 8 software development kit (SDK). For more information, see the The Cognos 8 SDK Developer Guide.

Scripts

Using the Windows script named trigger.bat or the shell script named trigger.sh, you can trigger one or more schedules to run on the server.

The script syntax follows where URL is the Cognos 8 server URL, username is a valid username in the specified namespace, password is the password for the username, namespace is the namespace for the username, and triggerlist is a comma separated list of trigger names:

trigger.bat URL [username password namespace] 
triggerlist

For example, if users want to schedule a report based on a database refresh and want to schedule a second report based on receipt of an email, your custom trigger command line may look similar to this:

trigger.bat http://localhost:9300/p2pd/servlet/dispatch username
password namespace databaserefreshtriggername,emailtriggername
Steps
  1. If you are setting up a trigger occurrence on a server other than a Cognos 8 server, complete the following tasks:

  2. Ensure that the command line runs when the external occurrence, such as a database refresh or email, occurs.

    The mechanism that you use to invoke your custom trigger command depends on the application that you are working with, such as a database system or an email application. For information, see the documentation for your application.

  3. Inform users that they can now schedule entries based on the trigger occurrence.

    If a user scheduled an entry based on the occurrence, when the user clicks the schedule button for a report view, occurrence information replaces frequency information on the Schedule page.

If a user scheduled an entry based on the occurrence, when the user clicks the schedule button for a report view, occurrence information replaces frequency information on the Schedule page.

After the script runs, the trigger method returns an integer value representing the number of schedules that were run. The following integers represent errors: