Scheduling a Report

To schedule a report, create its job descriptor and use the PUT method of the job service. Specify the report being scheduled inside the job descriptor. You do not need to specify any job IDs in the descriptor, because the server will assign them.

Method

URL

PUT

http://<host>:<port>/jasperserver[-pro]/rest/job/

Content-Type

Content

text/plain

A well-formed XML job descriptor.

Return Value on Success

Typical Return Values on Failure

201 Created – The body contains XML Job descriptor. This is the only case where a descriptor returns for a put request and that id due to the fact that the job id (the job handle) is created in the server.

404 Not Found – When the report specified in the job descriptor is not found in the server.

The output formats are those supported by JasperReports server, as given by the following values:

PDF
XLS
DOCX
HTML
XLS_NOPAG
RTF
CSV
XLSX
ODT
ODS
XLSX_NOPAG
 

The recurrence can be defined as follows:

No recurrence (single run), for example:
  <simpleTrigger>
    <startDate>2011-11-11T11:11:11-08:00</startDate>
    <timezone>America/Los_Angeles</timezone>
    <version>0</version>
    <occurrenceCount>1</occurrenceCount>
  </simpleTrigger>
Simple recurrence, for example every day until a given date:
  <simpleTrigger>
    <endDate>2011-11-11T11:11:11-08:00</endDate>
    <startDate>2012-12-12T12:12:12-08:00</startDate>
    <timezone>America/Los_Angeles</timezone>
    <version>0</version>
    <occurrenceCount>-1</occurrenceCount>
    <recurrenceInterval>1</recurrenceInterval>
    <recurrenceIntervalUnit>
      <value>DAY</value>
    </recurrenceIntervalUnit>
  </simpleTrigger>
Calendar recurrence, for example every Tuesday and Thursday in February, April, and June until next year:
< <calendarTrigger>
    <endDate>2012-12-12T12:12:12-08:00</endDate>
    <timezone>America/Los_Angeles</timezone>
    <version>0</version>
    <daysType><value>WEEK</value></daysType>
    <hours>0</hours>
    <minutes>0</minutes>
    <monthDays></monthDays>
    <months>2</months>
    <months>4</months>
    <months>6</months>
    <weekDays>3</weekDays>
    <weekDays>5</weekDays>
  </calendarTrigger>
Version: 
Feedback