Topic
  • 12 replies
  • Latest Post - ‏2011-01-12T23:59:21Z by SystemAdmin
jyothiph9
jyothiph9
19 Posts

Pinned topic Cognos report schedule failure.

‏2010-12-24T03:25:22Z |
My scheduled cognos report failed - how to resend the report after 15min if the schedule fails?

Thnks
Jyothi
Updated on 2011-01-12T23:59:21Z at 2011-01-12T23:59:21Z by SystemAdmin
  • jyothiph9
    jyothiph9
    19 Posts

    Re: Cognos report schedule failure.

    ‏2010-12-27T12:59:23Z  
    I'm trying to set up a condtion in event studio based on report failure the report has to run again any idea how to do this.
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-05T23:42:29Z  
    • jyothiph9
    • ‏2010-12-27T12:59:23Z
    I'm trying to set up a condtion in event studio based on report failure the report has to run again any idea how to do this.
    You should be able to check the Audit information (assuming you are logging to a database) for the success or failure of a report. If there is a failure then you can execute the report again with the event. However, the default event studio functionality will only allow you to define a specific report to execute. If you have many reports then this will require many event agents. What you might consider is calling an external application through a data modification stored procedure which would accept the report name as an input parameter. The external task would then call the report to be executed (using the Cognos SDK). This will make the process much easier because one event will be able to handle multiple report executions. Alternately, you could do this all with the SDK and take event studio out of the process.
  • jyothiph9
    jyothiph9
    19 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-06T13:07:52Z  
    You should be able to check the Audit information (assuming you are logging to a database) for the success or failure of a report. If there is a failure then you can execute the report again with the event. However, the default event studio functionality will only allow you to define a specific report to execute. If you have many reports then this will require many event agents. What you might consider is calling an external application through a data modification stored procedure which would accept the report name as an input parameter. The external task would then call the report to be executed (using the Cognos SDK). This will make the process much easier because one event will be able to handle multiple report executions. Alternately, you could do this all with the SDK and take event studio out of the process.
    Hi Phil,i have cretaed an event with the (staus=failure) and added two task one to send an Email and second to run an agent and scheduled the agent to run every 1 minute.

    in the second agent i haven`t created any condition only i added a task to run a report and scheduled the agent to run every 10 minutes.so what i want is that whenever a report fails send an email task has to run and after ten minutes the report in the second agent has to run.i am getting the failure notification by mail but the report in the second agent is not running. so plz tell where am i going wrong?
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-06T23:33:42Z  
    • jyothiph9
    • ‏2011-01-06T13:07:52Z
    Hi Phil,i have cretaed an event with the (staus=failure) and added two task one to send an Email and second to run an agent and scheduled the agent to run every 1 minute.

    in the second agent i haven`t created any condition only i added a task to run a report and scheduled the agent to run every 10 minutes.so what i want is that whenever a report fails send an email task has to run and after ten minutes the report in the second agent has to run.i am getting the failure notification by mail but the report in the second agent is not running. so plz tell where am i going wrong?
    If you don't have a condition for the second agent then there will never be any reason for the agent to perform the required tasks. You will probably have to use the same criteria for the second agent that you have used for the first agent.
  • jyothiph9
    jyothiph9
    19 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-07T01:02:54Z  
    If you don't have a condition for the second agent then there will never be any reason for the agent to perform the required tasks. You will probably have to use the same criteria for the second agent that you have used for the first agent.
    Hi Phil, I tried the condition (status= failure)for the second agent and added the task run the report only for new events and scheduled it to run for every 10 minutes that also doesnt work whts happening is that when i get a failure notification mail for the first agent at the same time only the report in the second agent is getting mailed. what i want is to run the report in the second agent after 10min of failure notification.
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-07T01:12:12Z  
    • jyothiph9
    • ‏2011-01-07T01:02:54Z
    Hi Phil, I tried the condition (status= failure)for the second agent and added the task run the report only for new events and scheduled it to run for every 10 minutes that also doesnt work whts happening is that when i get a failure notification mail for the first agent at the same time only the report in the second agent is getting mailed. what i want is to run the report in the second agent after 10min of failure notification.
    I the second agent put a condition in that the report execution time must be greater than 10 minutes from the current time. Then schedule the second agent to run every minute.
  • jyothiph9
    jyothiph9
    19 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-07T05:54:18Z  
    I the second agent put a condition in that the report execution time must be greater than 10 minutes from the current time. Then schedule the second agent to run every minute.
    Phil can you please send me the expression that i have to use in the agent.
  • jyothiph9
    jyothiph9
    19 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-07T11:55:43Z  
    • jyothiph9
    • ‏2011-01-07T05:54:18Z
    Phil can you please send me the expression that i have to use in the agent.
    Here i am attaching the screenshots.
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-09T23:19:08Z  
    • jyothiph9
    • ‏2011-01-07T11:55:43Z
    Here i am attaching the screenshots.
    Separate the two agents. Instead of calling the second agent from the first one, set them both up to run at 1 minute intervals. Then take the condition from your first agent and add it to the current_date condition used in your second agent. The second agent must have the same criteria used in the first agent. Otherwise, the second agent will have no idea which records actually trigger the event tasks.
  • jyothiph9
    jyothiph9
    19 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-10T06:30:39Z  
    Separate the two agents. Instead of calling the second agent from the first one, set them both up to run at 1 minute intervals. Then take the condition from your first agent and add it to the current_date condition used in your second agent. The second agent must have the same criteria used in the first agent. Otherwise, the second agent will have no idea which records actually trigger the event tasks.
    Hi Phil is this condition (Package='NFMS' and Status='FAILURE' and current_date=Time stamp+(10/1440)) works for the second agent so that the report has to run after 10minutes.
  • jyothiph9
    jyothiph9
    19 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-12T11:44:31Z  
    Separate the two agents. Instead of calling the second agent from the first one, set them both up to run at 1 minute intervals. Then take the condition from your first agent and add it to the current_date condition used in your second agent. The second agent must have the same criteria used in the first agent. Otherwise, the second agent will have no idea which records actually trigger the event tasks.
    Phil can u tell me the correct condition which i have to use in the agent.

    Thanks
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Cognos report schedule failure.

    ‏2011-01-12T23:59:21Z  
    • jyothiph9
    • ‏2011-01-12T11:44:31Z
    Phil can u tell me the correct condition which i have to use in the agent.

    Thanks
    I've just set one up for you. This is the condition:

    [Status]='Failure' AND [Time stamp] <= getdate() - 10 minute AND [Report name] = 'Copy of Consecutive Periods Comparison'
    


    I've also included the request ID in the data items so that I can be sure that a record is returned for each report execution. The SQL Server getdate() function is used because the current_timestamp creates a timestamp with timezone information which does not match to the basic timestamp information stored in the "Time stamp" field. Use the appropriate database-specific function to get the relevant server time.

    Next, add the report execution task and set it to trigger on New events only.

    Save the agent and schedule it to run at 1 minute intervals. This agent successfully re-executes the report at 10 minute intervals (+- a few seconds).

    Hopefully this should be enough to get you past your current difficulties. If it isn't then I would suggest purchasing some consulting services.
    Updated on 2014-03-25T08:17:31Z at 2014-03-25T08:17:31Z by iron-man