Use > Service Manager Reports > Report schedule and distribution

Report schedule and distribution

Report schedules assist report managers or administrators to send the reports or the dashboards information on scheduled intervals to the notified users or user groups.

A report schedule specifies who is to be notified, when, and the notification method. An administrator must make sure that the report or dashboard has been created in Service Manager before Service Manager can create an report schedule record.

Scheduled reports or dashboards enable users to view the updated content without logging in to Service Manager. Service Manager Reports provide two ways to distribute the schedule reports or dashboards: sending email notifications by attaching the generated PDF files, or using the file server to save the generated files.

For example, if you want to embed the scheduled reports to your applications, you can follow these steps:

  1. Generate scheduled reports and specify a folder for these reports.
  2. Set up an Apache instance to access the folder and provide static URLs for the reports.
  3. Embed the Apache URLs in the products.

In this way, users can view the updated content from your applications timely and directly.

Create a report schedule

Applies to User roles: Report Manager

To create a new report schedule, follow these steps:

  1. Click Reporting > Report Schedule > Create New Schedule.
  2. Type the name of the new report schedule in the Name field.
  3. Select the Owner for this report schedule. The owner is the operator by default. You can change this value only if you are a Report Administrator.
  4. Type the description of the new report schedule in the Description field.
  5. Select the dashboards or reports for which you want to schedule notifications. By default, you can add up to five reports and dashboards to a scheduled task. You can change the default value of Max reports/dashboards per scheduled task from Reporting > Administration > Report Settings.
  6. Set the other properties for the report schedule.

    Component Description Table field Content
    Export to Selects the method to send the notification.  

    Two methods are available:

    • Email (PDF): Email notification by sending the PDF files

      Tip After you select Email (PDF), the Use Notification check box becomes available. You can select this check box and then select a notification definition from the Combo Box to send emails by following the notification rules.

      To add a new notification definition record, click the View Detailed Information button in the Combo Box and then follow the instructions as documented in Service Manager Help Center > System Administration > Status and Notifications > Notifications > Add a notification definition record. Note that you must select email in the Notify Method column.

      Note

      • When you select the Use Notification check box, the Email tab is disabled and hidden.
      • When sending an email using a customized HTML template for the exported reports, be sure to add the following codes to the Expressions tab of the HTML template. Otherwise, the system does not attach the generated report to the email.

        // please always keep "##schedule task id:**##" in email_title
        // It will not be displayed in email and will be discarded in 
        eventout trigger
        email_title += "##Schedule Task ID:"+ $RECORD.id+"##" 
      • When sending an email using a format for the exported reports, be sure to add the following codes to the Text field of the message record.

        ##Schedule Task ID:%S##

        For example, the value in the Text field is format test in a format. To support email notification using this format, you must add ##Schedule Task ID:%S## to the Text field. The new value for the Text field is format test ##Schedule Task ID:%S##.

    • File Server: Save the generated files to a file server

    Note  

    • If you selected a report of the List type, the number of records that can be exported from this report is limited by the Max number of records from a list report that can be exported in the back end setting. See Configure report settings.
    • If you have configured any colored ranges for reports, these are included in the exported file.

    Page Direction Selects the page direction of the exported file.   Two directions are available: Portrait and Landscape.
    File Type to Save Selects the file types to save the notification.   Two file types are available: PDF, and HTML. This component is activated only when you have selected File Server as the exporting method.
    Next Event     Shows the next event for this report schedule.
    Recent Histories (30 days) Lists the tasks which have been run during the last 30 days.   Shows the task detail message.
    Rule Sets the rules for the schedule. On an arbitrary schedule If this option is selected, the regular schedule definition is not displayed and you need to provide specific time for the schedule.
    Range of recurrence Specifies the effective period of this report schedule.
    Recurrence Specifies the recurrence of this report schedule.
    Start time Specifies the start time of this report schedule.
    Email Sets the properties for the Email notification. Subject The name of the Email notification that is sent to the recipients when the action occurs.
    Email To/ Groups The user or user group who receive the email notification.
    Workflow Shows the status of current report schedule.  

    There are three types of the report schedule status: planning, scheduled, and retired.

    Activities Shows the activities related to this report schedule.   The activities show the information about who has created, or updated the report schedule, and at what time.
  7. Click Add. A unique report ID is automatically assigned to this report and displayed in the Schedule ID field.

To update an existing report schedule, follow these steps:

  1. Click Reporting > Report Schedule > Search Schedule.

    Note Report Administrator can search all report schedules while others can only search their own schedules.

  2. Use search or advanced search to find one or more record schedules. A list of report schedules opens.
  3. Select a report schedule from the list.

  4. Update the required information.

    The following list describes the phases in the schedule lifecycle and their corresponding system actions:

    • Planning -> Scheduled: the task will be generated and the schedule cannot be updated
    • Scheduled -> Planning: the scheduled task will be removed and the schedule is editable again
    • Scheduled -> Retired: the scheduled task will be removed and an email notification will be sent to the schedule owner
    • Planning -> Retired: an email notification will be sent to the schedule owner
    • Retired -> Planning: the schedule can be updated and saved
  5. Click Save. A message appears that confirms that the record schedule is updated.

Report background schedule process

You can start a background schedule process by running the sm report.export command. Make sure you have already specified the path to save the exported reports and dashboards by adding the dashboard_export_path parameter to the sm.ini file.

Note If you set too many threads for one process, you have to add the JVMOption parameter to expand the memory capacity. For example, you can start the process by running the following command:

sm -JVMOption0:-Xms1024m -JVMOption1:-Xmx1024m report.export

To check the running status of the background schedule process, click Miscellaneous > System Status.

There are six types of threads which will run:

  • report.export.misc

    • Cleans the report performance log
    • Regenerates the schedule task in 30 days
    • Moves the task from reportscheduletask to reportschedulehistory
  • report.export.distribute

    Distributes the reports or the dashboards by email or to the file server.

    Note The clean:1 parameter excludes a message from email notifications about exported reports or dashboards. See Startup parameter: emailout. By default, this message is included.

  • report.export.prepare

    Prepares the data to generate the reports and dashboards.

  • report.export

    This schedule thread will synchronize the status of the other three types of schedule threads. Restart the schedule thread if it stops responding. Make sure you set the correct maximum counts of running threads. You can change the default value of Max report-exporting threads per process and Max report-preparing threads per process from Reporting > Administration > Report Settings.

  • report.calccharts

    Scans the system every one minute to check if there is any new report or updated report for calculation.

  • timedurationdata

    Extracts the raw time stamp information from the source tables. Service Manager will process the data and save the change metrics in the intermediate tables, for example, in the timeDuration4probsummary table.

Report schedule task lifecycle

Service Manager creates the schedule tasks for a report schedule. A schedule record can generate several schedule tasks. Each schedule task includes lifecycle states relating to the process from task created, to preparing report data, and to exporting report data, as shown in the following figure.

The state transition from Created to Preparing can be interrupted when the administrator:

  • Disables reporting
  • Stops sending reports or dashboards via email, if the scheduled reports are sent only via email

The state transition from Prepared to Sending can be interrupted when the administrator:

  • Stops sending reports or dashboards via email, if the scheduled reports are sent only via email.
  • Does not specify a location for the exported reports, if the scheduled reports are only exported to the file server
  • Service Manager cannot interrupt the state transition from Preparing to Prepared or the state transition from Sending to Exported.
  • If you disable reporting, it will prevent Service Manager from generating any more schedule tasks.

Apply a template to complete a report schedule

Templates enable users to quickly complete a report schedule by automatically populating fields with the applicable information.

To apply a template to complete a report schedule, follow these steps:

  1. Open a report schedule.
  2. Click Apply Template. The Select Report Schedule Template wizard opens.
  3. Double-click the template that you want to apply to the selected report schedule. You are returned to the selected report schedule, and the fields are automatically filled in with the values set in the template.
  4. Complete the other fields, as needed.
  5. Click Save & Exit.
    Note: Users authorized to use this template can also modify the template to meet their needs.