Configuring Report Scheduling

The JasperReports Server report scheduling feature is powered by the Quartz scheduler tool. Buildomatic automatically handles configuration settings for Quartz-based report scheduling.

In a deployed JasperReports Server instance, you'll find the js.quartz.properties file in this location:

<app-server-path>/jasperserver-pro/WEB-INF/js.quartz.properties

For mail server configuration, you'll find an additional property setting for authentication in this file:

<app-server-path>/webapps/jasperserver-pro/WEB-INF/applicationContext-report-scheduling.xml

The following configurations are discussed in this section:

     Mail Server Configuration
     Quartz Driver Delegate Class
     Report Scheduler Web URI
     Quartz Table Prefix
     Settings for import-export
     Setting Properties in the default_master.properties File

Mail Server Configuration Settings

You can specify email addresses to notify when a report completes. To do this, configure JasperReports Server to contact an email server as shown in the following table.

Configuration File

<app-server>/<deployment>/WEB-INF/js.quartz.properties

Property

Description

report.scheduler.mail.sender.host

The name of the computer hosting the mail server

report.scheduler.mail.sender.username

The name of the mail server user JasperReports Server can use

report.scheduler.mail.sender.password

The password of the mail server user

report.scheduler.mail.sender.from

The address for in the From field on email notifications

report.scheduler.mail.sender.protocol

The protocol that the mail server uses. JasperReports Server supports only SMTP.

Note: Your entry must be lower case (smtp)

report.scheduler.mail.sender.port

The port number the mail server uses. The default is typically 25 (other ports may not work in earlier JasperReports Server versions).

Configuration File

<app-server>/<deployment>/WEB-INF/applicationContext-report-scheduling.xml

Property

Bean

Description

javaMailProperties key="mail.smtp.auth"

reportScheduler

MailSender

If your mail server requires authentication, change this property from false to true.

Database Settings for the Quartz Driver Delegate Class

Quartz uses the Quartz driver delegate class to interact with the JDBC driver.

If you used buildomatic to install JasperReports Server, the correct value of the Quartz driver delegate class is automatically set for your database.

If you didn’t use buildomatic to install JasperReports Server, refer to the following table to edit the js.quartz.properties file and set the value of the Quartz driver delegate class to the correct value for your database.

Configuration File

<app-server>/<deployment>/WEB-INF/js.quartz.properties

Property

Database

Value

quartz.delegateClass

MySQL

org.quartz.impl.jdbcjobstore.StdJDBCDelegate

PostgreSQL

org.quartz.impl.jdbcjobstore.PostgreSQLDelegate

DB2

org.quartz.impl.jdbcjobstore.DB2v8Delegate

Oracle

org.quartz.impl.jdbcjobstore.StdJDBCDelegate

SQL Server1

org.quartz.impl.jdbcjobstore.StdJDBCDelegate
1. For SQL Server on WebSphere 8.5 use org.quartz.impl.jdbcjobstore.MSSQLDelegate

Settings for the Report Scheduler Web URI

JasperReports Server uses the Report Scheduler Web URI to construct the link it sends in the output of a scheduled job. This link must be correct for the user to access the report on the server.

The port on which you run JasperReports Server and the context root of the deployed JasperReports Server web application determine the report scheduler Web URI. The default context root is jasperserver.

To set this value manually, edit this file:

<app-server>/<deployment>/WEB-INF/js.quartz.properties.

Change the properties as shown in the following table.

Property

App Server

Example Value

report.scheduler.web.deployment.uri

Apache Tomcat

http://localhost:8080/jasperserver<MadCap:conditionalText data-mc-conditions="JasperConditions.Pro">-pro</MadCap:conditionalText>

JBoss

http://localhost:8080/jasperserver<MadCap:conditionalText data-mc-conditions="JasperConditions.Pro">-pro</MadCap:conditionalText>

GlassFish

http://localhost:8080/jasperserver<MadCap:conditionalText data-mc-conditions="JasperConditions.Pro">-pro</MadCap:conditionalText>

WebLogic

http://localhost:7001/jasperserver-pro

WebSphere

http://localhost:9080/jasperserver-pro

Settings for the Quartz Table Prefix

For databases that support schemas, such as Oracle, SQL Server, and DB2, you can set the Quartz table prefix to include the schema, if you use one. In the default configuration, only DB2 requires an explicit schema name.

If you installed JasperReports Server using buildomatic the Quartz table prefix is set automatically.

To set this value, edit the file <app-server>/<deployment>/WEB-INF/js.quartz.properties. Change the following property:

Property

Description

quartz.tablePrefix

The prefix for the quartz table, including any schema name, for example JSPRSRVR.QRTZ_ for DB2.

Settings for Import-Export

If you manually configure the import-export shell scripts instead of using the buildomatic, make sure your settings for the Quartz driver delegate class property are correct for your database.

If you install using buildomatic, these settings are handled automatically (in buildomatic import-export).

To configure the import-export scripts manually, edit this file:

<js-install>/buildomatic/conf_source/iePro/js.quartz.properties

Change the following properties:

Property

Description

quartz.delegateClass

Set to the same value as described in Database Settings for the Quartz Driver Delegate Class.

quartz.tablePrefix

Set to the same value as described in Settings for the Quartz Table Prefix

Setting Properties in the default_master.properties File

You can modify the default_master.properties file to configure JasperReports Server functionality. Uncomment the properties you want to have them take effect upon installation. The properties are documented directly in the default_master.properties file:

<js-install>/buildomatic/default_master.properties

You'll find a sample master.properties here (in the case of PostgreSQL):

<js-install>/buildomatic/sample_conf/postgresql_master.properties

When you execute the js-install.sh/bat script (or the underlying deploy-webapp-pro ant target), these properties will be set in the deployed JasperReports Server in the js.quartz.properties file.

Report Scheduler Email Properties

You can set the following properties to configure the Report Scheduler email (default values are shown):

quartz.mail.sender.host=mail.localhost.com

quartz.mail.sender.port=25

quartz.mail.sender.protocol=smtp

quartz.mail.sender.username=admin

quartz.mail.sender.password=password

quartz.mail.sender.from=admin@localhost.com

quartz.web.deployment.uri=http://localhost:8080/jasperserver-pro

Diagnostic Properties

The following properties configure the Diagnostic functionality:

diagnostic.jmx.usePlatformServer = false

diagnostic.jmx.port = 10990

diagnostic.jmx.name = jasperserver

diagnostic.jmx.rmiHost = localhost

Look at the descriptions of the properties in the default_master.properties file and also refer to the JasperReports Server Administrator Guide for more information on these settings.

Feedback