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 will find the js.quartz.properties file in this location:
<app-server-path>/
jasperserver/WEB-INF/js.quartz.properties
For mail server configuration, you will find an additional property setting for authentication in this file:
<app-server-path>/webapps/
jasperserver/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
- Settings for Skipping Calendar Job Execution Immediately After Import
Mail Server Configuration Settings
You can specify email addresses to be notified when a report run is complete. To do this, configure JasperReports Server to contact an email server. The email server can be contacted via mail or by using a graph API.
|
By default, JasperReports Server uses mail to contact an email server. To change it to graph API, in the |
Mail Server Configuration Settings Using E-mail
The following table provides the configuration information to contact an email server via mail:
Configuration File |
||||
<app-server>/<deployment>/WEB-INF/js.quartz.properties |
||||
Property |
Description |
|||
|
The name of the computer hosting the mail server. |
|||
|
The name of the mail server the user JasperReports Server can use. |
|||
|
The password of the mail server user. |
|||
|
The address for the |
|||
|
The protocol that the mail server uses. JasperReports Server supports only SMTP. Note: Your entry must be lower case ( |
|||
|
The port number that 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 |
||
|
|
If your mail server requires authentication, change this property from |
Mail Server Configuration Settings Using Graph API
Prerequisite for Azure Graph API login
The following are the prerequisites for Azure Graph API login:
-
Register JasperReports Server as an application on the Azure portal.
-
Obtain the details for Resource Owner flow and Client Credentials flow.
-
For Resource Owner flow, obtain the following details:
-
Username
-
Password
-
-
For Client Credentials flow, obtain the following details:
-
Client ID
-
Client Secret
-
User ID
-
Tenant ID
-
-
Define the Mailbox Permissions and Scope.
Ensure that the following permissions are defined in the scope:
-
Mailbox
-
Mail.Send
-
Mail.ReadWrite
-
-
Obtain the
resourceGroupName
configured for Azure SQL.
The following table provides the configuration information to contact an email server using a graph API:
Configuration File |
|||
<app-server>/<deployment>/WEB-INF/js.quartz.properties |
|||
Property |
Description |
||
|
The URL of the mail server. |
||
|
The unique application or client ID assigned to JasperReports Server by Azure Active Directory (AD). |
||
|
A secret string that the application uses to identify itself while requesting a token. |
||
|
An instance of Azure AD. |
||
|
The username to connect to Azure. |
||
|
The password to connect to Azure. |
||
emailService.graph.oauthUserId
|
The unique object ID using which JasperReports Server is registered. | ||
clientSecretCredentialFlow
|
The authentication is done either by providing the Depending on the authentication you want to use, set
|
||
azureSql.resourceGroupName
|
To fetch the list of databases, the resource group is required while creating AzureSqlManagementService bean. By default, it is set to defaultResourceGroup . |
The bean for graph API is created only when the graph profile is enabled in web.xml
. By default, the 'graph' profile in the web.xml
file is disabled to prevent unnecessary bean creation. To enable the 'graph' profile:
<context-param> <param-name>spring.profiles.active</param.name> <param-value>default,engine,alerting-ie,jrs,graph</param.value> </context-param>
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 did not 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.
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
|
JBoss |
http://localhost:8080/jasperserver
|
|
WebLogic |
http://localhost:7001/jasperserver-pro
|
|
WebSphere |
http://localhost:9080/jasperserver-pro
|
Settings for the Quartz Table Prefix
For databases that support schemas,
|
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 |
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/
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 the JasperReports Server functionality. Uncomment the properties that you want to have them take effect on installation. The properties are documented directly in the default_master.properties
file:
<js-install>/buildomatic/default_master.properties
You will find a sample master.properties here (in the case of PostgreSQL):
<js-install>/buildomatic/sample_conf/postgresql_master.properties
When you run the js-install.sh/bat
script (or the underlying deploy-webapp-
ant target), these properties will be set in the deployed JasperReports Server in the js.quartz.properties
file.
You can set the following properties in default_master.properties file (default values are shown):
-
notification.service.multiTenant.config=none
-
emailService.type=mail
-
calenderTrigger.resetStartTimeOnImport=false
-
simpleTrigger.resetStartTimeOnImport=false
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
For information about the Prerequisite for Azure Graph API login, see Mail Server Configuration Settings Using Graph API.
You can set the following properties to configure the Report Scheduler email using a graph API (default values are shown):
emailService.graph.oauthUrl=https://graph.microsoft.com
emailService.graph.oauthClientId=oauthClientId
emailService.graph.oauthSecret=oauthSecret
emailService.graph.oauthTenantId=oauthTenantId
emailService.graph.oauthUserName=username
emailService.graph.oauthPassword=password
emailService.graph.oauthUserId=oauthUserId
emailService.graph.clientSecretCredentialFlow=true
azureSql.resourceGroupName=defaultResourceGroup
|
When sending a file with email:
For details, refer to Outlook-Large-Attachments. |
For information about properties to be set when composing email, refer to the Setting Properties in the jasperserver_config.properties File section in the JasperReports® Server Administrator Guide.
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.
Settings to Skip Calendar Job Execution Immediately After Import
When importing scheduled jobs, all calendar jobs with misfired triggers are re-executed. This results in unwanted and unplanned executions. This can be overcome by changing the Misfire policy on the server. But, that will impact all other jobs along with the calendar trigger.
To avoid this, you can add two new properties calenderTrigger.resetStartTimeOnImport
and simpleTrigger.resetStartTimeOnImport
to stop executing calendar jobs immediately after import.
These properties, when set to false
, skip executing calendar jobs right after import. The job is executed at the next trigger (calendar or simple). On setting the properties to true
, the start time of the job is reset to the current time and it is not considered as misfired after the import.
Configuring Scheduler Misfire Policy |
|||
Property |
Description |
||
|
By default, calenderTrigger.resetStartTimeOnImport=false . If set to true , then while importing the job, start time is recalculated to the import time. And, the job execution starts in the future based on the condition set in calendar trigger. |
||
simpleTrigger.resetStartTimeOnImport
|
By default,
|
Recommended Comments
There are no comments to display.