Monday 31 October 2011

Cognos Reports Scheduling by using "By Trigger" Option

This post is not completed till now .I have not been able to configure scripts to run on server trigger.bat till now.Will update once done.If you are enthusiastic you can try the below step and let me know if you are able to generate the trigger.bat file


Setting Up Trigger-based Scheduling

To schedule an entry based on an occurrence and confirm trigger-based scheduling, you must have read, write, execute, and traverse permissions. You also require the following access permissions for all data sources used by the entry.

Data source :Execute and Traverse
dataSourceConnection:Execute and Traverse ,
With only Execute access, you are prompted to log on to the database.
dataSourceSignon:Execute

Before setting up trigger-based scheduling, ensure that your credentials exist and are up to date



Schedule an Entry Based on an Occurrence
As part of setting up trigger-based scheduling, you must schedule an entry based on an occurrence.
Steps
1. Click the schedule button next to the entry you want to schedule.
2. Under Frequency, click the By Trigger tab.
3. In Trigger name, type the name of the trigger occurrence.
Note: The trigger name that you enter may be provided to you by your administrator or developer. If not, you must inform your administrator or developer of the trigger name that you use.
4. The default start date is "now", and the default end date is "forever", which means the trigger schedule will always run when the trigger is fired (either from trigger.bat or from an SDK app). If you put in a valid start and end date, the trigger schedule can only be fired between those dates.
5. Click OK.



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 usernamepassword namespace databaserefreshtriggername,emailtriggername

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:

· -1 is a usage error, such as invalid parameter or syntax
· -2 is a communication problem with Cognos 8 server


Disable Support for Trigger-based Scheduling

By default, trigger-based scheduling is enabled. An occurrence acts as a trigger, causing the report to run. You can disable this feature by modifying the system.xml file.
Steps
1. Stop the Cognos 8 service.
2. Open the c8_location/templates/ps/portal/system.xml file in an XML or text editor.
3. Locate the following XML code in the system element:4. 5. true6. 7. 8. true
9. Change the value of both trigger parameters from true to false.
The XML code should appear as follows: false false
10. Save the file.
11. Start the Cognos 8 service.
The By Trigger tab on the Schedule page no longer appears. Entries that are already scheduled for trigger-based scheduling continue to run, but no further trigger scheduling can occur while support is disabled.

No comments:

Post a Comment