CentraSite 10.11 | CentraSite User’s Guide | Report Management | Managing Reports and Report Templates through Command Line Interface | Adding Custom Scheduled Report
 
Adding Custom Scheduled Report
Pre-requisites:
To add a new scheduled report through the CentraSite Command Line Interface, you must have the CentraSite Administrator role.
CentraSite provides a command tool named add Scheduled Report for this purpose.
*To add a new scheduled report
*Run the command add Scheduled Report.
The syntax is of the format: C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd add Scheduled Report [-url <CENTRASITE-URL>] -user <USER-ID> -password <PASSWORD> -file <CONFIG-FILE>
The input parameters are:
Parameter
Description
CENTRASITE-URL
(Optional). The URL of the CentraSite registry. For example, http://localhost:53307/CentraSite/CentraSite.
USER-ID
The user ID of a registered CentraSite user who has the CentraSite Administrator role. For example, Administrator.
PASSWORD
The password for the registered CentraSite user identified by the parameter USER-ID.
CONFIG-FILE
Name of the configuration file which contains the report scheduled properties.
Example (all in one line):
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd add Scheduled Report -url http://localhost:53307/CentraSite/CentraSite –user Administrator –password manage –file c:\temp\ScheduledReportConfig.xml
The response to this command could be:
Executing the command : add Scheduled Report

Successfully executed the command : add Scheduled Report
Scheduled Report Configuration File
You can configure the details for new scheduled report in an XML configuration file. The configuration file ScheduledReportConfig.xml must look like the one below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0">
<entry key="com.centrasite.scheduledreport.Name"></entry>
<entry key="com.centrasite.scheduledreport.Description"></entry>
<entry key="com.centrasite.scheduledreport.Report"></entry>
<entry key="com.centrasite.scheduledreport.EmailAddress"></entry>
<entry key="com.centrasite.scheduledreport.Locale"></entry>
<entry key="com.centrasite.scheduledreport.Occurrence"></entry>
<entry key="com.centrasite.scheduledreport.Frequency"></entry>
<entry key="com.centrasite.scheduledreport.DayOfMonth"></entry>
<entry key="com.centrasite.scheduledreport.Days"></entry>
<entry key="com.centrasite.scheduledreport.Ordinal"></entry>
</properties>
The contents of the configuration file are listed below:
Tag Name
Description
Name
(Mandatory). The name of the scheduled report.
Description
(Optional). Description for the scheduled report.
Report
(Mandatory). The name of the report to execute.
EmailAddress
(Mandatory). The email address of the consumer who should be informed of the result of the report execution.
Locale
(Optional). The locale of the report to execute. If the locale is not set, the default locale is used.
Note that the current version of CentraSite only supports the default locale.
Occurrence
(Mandatory). The occurrence options with which you want to schedule a report to execute automatically. Possible values - daily, weekly, monthly.
Frequency
(Optional). The frequency with which you want a report to execute automatically on a regular schedule.
Example:
If you specify Occurrence=daily, Frequency=10, then your report will execute every 10 days.
DayOfMonth
(Optional). The exact day of the month when you want the scheduled report to execute automatically.
Note:
You can use this property, when you have the occurrence option set to monthly.
Example:
If you specify Occurrence=monthly, Frequency=2, DayOfmonth=5, then your report will execute on day 5 of every 2 months.
Days
(Optional). The exact days of the week when you want the scheduled report to execute automatically. Possible values - monday, tuesday, wednesday, thursday, friday, saturday, sunday
Note:
Specify the values as a comma-separated list.
Example:
If you specify Occurrence=weekly, Frequency=2, Days=[monday, friday] then your report will execute every 2 weeks on the specified days, that is, Monday and Friday.
Ordinal
(Optional). The ordinal with which you want the scheduled report to execute automatically. Possible values - first, second, third, forth, last
Example:
If you specify Occurrence=monthly, Frequency=3, Days=[monday], Ordinal=first, then your report will execute the first Monday of every 3 months.
The following table summarizes the effects of scheduled report configuration for seven exemplary cases:
If You Want the Schedule to Execute This Often
Occurrence
Frequency
Day of the Month
Weekdays
Ordinal
Every day
Daily
1
n/a
n/a
n/a
Every specific number of days (for example, every 7 days)
Daily
7
n/a
n/a
n/a
Every week on a certain day (for example, every week on Wednesday)
Weekly
1
n/a
Wednesday
n/a
Every specific number of weeks on a certain day (for example, every 2 weeks on Friday)
Weekly
2
n/a
Friday
n/a
Every month on a specific date, (for example, the 10th of every month)
Monthly
1
10
n/a
n/a
Every month on a certain day (for example, the third Monday of every month)
Monthly
1
n/a
Monday
third
Every specific number of months on a certain day (for example, the last Friday of every 3rd month)
Monthly
3
n/a
Friday
last
Here is a sample configuration file. The sample illustrates how you can add a new scheduled report with name Schedule Daily, with description Executes the report and sends the result every day, the report to execute is API Invocations (daily), the email address to send the output pdf file is xxx@domain.com and the schedule is every day.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0">
<entry key="com.centrasite.scheduledreport.Name">Schedule Daily</entry>
<entry key="com.centrasite.scheduledreport.Description">
Executes the report and sends the result every day</entry>
<entry key="com.centrasite.scheduledreport.Report">
API Invocations (daily)</entry>
<entry key="com.centrasite.scheduledreport.EmailAddress">
xxx@domain.com</entry>
<entry key="com.centrasite.scheduledreport.Locale"></entry>
<entry key="com.centrasite.scheduledreport.Occurrence">daily</entry>
<entry key="com.centrasite.scheduledreport.Frequency">1</entry>
<entry key="com.centrasite.scheduledreport.DayOfMonth"></entry>
<entry key="com.centrasite.scheduledreport.Days"></entry>
<entry key="com.centrasite.scheduledreport.Ordinal"></entry>
</properties>