Adding a Schedule

Adds a new schedule to a Web Intelligence document.

The schedule can be sent in different formats to several destinations and set just for once, daily, hourly or monthly. You can also select a server group that the system uses to run the schedule. These settings are described in the body of the request.

For more information on scheduling, refer to the SAP Business Objects Business Intelligence Platform, BI Launch Pad User Guide.

Note You can find scheduling information in the details of a document. The <scheduled> element returned in the response body provides true if the document has been scheduled, otherwise false.
Request

POST <webiURL>/documents/{documentId}/schedules

Where:

  • {documentId}: the identifier of the Web Intelligence document is retrieved from the document list

Request body:

<schedule>
    <name>
    <format type="webi|pdf|xls|csv">
    <destination>
    <recurrence_expression>
    <serverGroup id="..." required="true|false"/>
</schedule>

Where:

  • <name> is the schedule name
  • <format> is the document format. By default, the format is webi. The csv type has specific options, see the following details.
  • <destination> is the document destination. Destination can be the BI launch pad inbox, an email address, a local file, or a file via ftp. If no destination tag is specified, the destination is the default one defined on the backend system.
  • <recurrence_expression> indicates the scheduling recurrence (<once>, <now>, <hourly>, <daily>, or <monthly>). See below for details.
  • <serverGroup> is the server group used to run the schedule:
    • id is the ID of the server group as defined in the CMC (Integer).
    • required: if false, the schedule is run preferably on the server that belongs to the specified server group. If the specified server is not available, then the schedule is run on the next available server. If true, only the specified servers found within the selected server group is used. If all of the servers in the server group are unavailable, then the schedule is not processed.

If the format type is CSV, the following options are supported:

<format type="csv">
    <properties>
        <property key="textQualifier">'</property> <!-- either ' or " -->
        <property key="columnDelimiter">,</property> <!-- either , or ; or tab -->
        <property key="charset">UTF-8</property> <!-- a valid server charset -->
        <property key="onePerDataProvider">false</property>
    </properties>
</format>

The <destination> element accepts a series of parameters which are described in the next sections. The destination can also have the following attributes and child elements:

<destination keepInstanceInHistory="false">
    <useSpecificName fileExtension="false">-customTest</useSpecificName>
</destination> 

Where:

  • keepInstanceInHistory is a Boolean attribute that keeps the instance of the schedule document in history if it is true (default)
  • <useSpecificName> is the specific name of the scheduled document at destination. Automatic name is used if the element is not specified.
  • fileExtension specifies a file extension. Default is true.

The following table describes the possible recurrence expressions.

XML Recurrence Expression Schedule Time

No recurrence expression

Now

<once retriesAllowed="2" retryIntervalInSeconds="60">
    <startdate>...</startdate>
    <enddate>...</enddate>
</once>

Once, launched at <startdate>.

  • retriesAllowed: the number of retries
  • retryIntervalInSeconds: the time between two retries
  • <startdate>: the date and time to launch the schedule
  • <enddate>: the date and time to stop the schedule
<daily retriesAllowed="2" retryIntervalInSeconds= "60">
    <startdate>...</startdate>
    <enddate>...</enddate>
    <dayinterval>1</dayinterval>
</daily>

Daily.

<dayinterval> is the day interval to repeat the schedule.

<hourly retriesAllowed="2" retryIntervalInSeconds="60"> 
    <startdate>...</startdate>
    <enddate>...</enddate>
    <hour>1</hour>
    <minute>30</minute>
</hourly>

Hourly.

<hour> and <minute> define the time interval to repeat the schedule.

<monthly retriesAllowed="2"retryIntervalInSeconds= "60">
    <startdate>...</startdate>
    <enddate>...</enddate>
    <month>1</month>
</monthly>

Monthly.

<month> defines the month interval to repeat the schedule.

Response

Response type: application/xml or application/json

The response is a message stating the success or failure of a request.