Running, printing, and viewing a document : Running or printing a job : Scheduling report generation or printing
 
Scheduling report generation or printing
Use SubmitJob to run or print a job on a schedule. You can schedule any executable file to run or print immediately, daily, weekly, monthly, or on specific dates.
When a scheduled job cannot run because BIRT iHub is down, the job runs when BIRT iHub restarts. If a job has multiple pending occurrences when BIRT iHub restarts, only one instance runs.
The following example schedules a job to run once a week, using the highest priority, starting at midnight Pacific time every Monday from December 1, 2008, to December 1, 2009:
<SOAP-ENV:Body>
<SubmitJob>
<JobName>ForecastSchedule</JobName>
<Headline>Quarterly forecast updates</Headline>
<Priority>1000</Priority>
<InputFileName>Forecast.rptdesign</InputFileName>
<RunLatestVersion>true</RunLatestVersion>
<RequestedOutputFile>
<Name>Forecast.rptdocument</Name>
<AccessType>Private</AccessType> </RequestedOutputFile>
<Operation>RunReport</Operation>
<Schedules>
<TimeZoneName>PST</TimeZoneName>
<ScheduleDetails>
<JobScheduleDetail>
<ScheduleType>Weekly</ScheduleType>
<ScheduleStartDate>2008-12-1</ScheduleStartDate>
<ScheduleEndDate>2009-12-1</ScheduleEndDate>
<Weekly>
<FrequencyInWeeks>1</FrequencyInWeeks>
<RunOn>Mon</RunOn>
<OnceADay>14:00:00</OnceADay>
</Weekly>
</JobScheduleDetail>
</ScheduleDetails>
</Schedules>
<NotifyGroupsByName>
<String>Sales Managers</String>
</NotifyGroupsByName>
</SubmitJob>
</SOAP-ENV:Body>
In this example:
*JobName is a title for the schedule.
*Headline is a title that a channel subscriber sees.
*Priority sets a priority for the job ranging from 0 to 1000, where 1000 is the highest priority.
*InputFileName identifies the executable file to use as input.
*RequestedOutputFile provides a file name and extension for the output. It also identifies the access type of the file, either Private or Shared.
*Operation identifies the task to schedule, either RunReport or RunAndPrintReport.
*NotifyGroupsByName sets the notification groups to notify of job success or failure. RunLatestVersion specifies whether to run or print the most recent version of the executable file. RunLatestVersion ignores any version numbers in InputFileName.
*The JobScheduleDetail element of ScheduleDetails specifies the frequency of the run, the start and end dates for the schedule, the day and time of the run, and other details.
When the job succeeds, the SubmitJob request returns the JobId:
<SOAP-ENV:Body>
<SubmitJobResponse>
<JobId>145</JobId>
</SubmitJobResponse>
</SOAP-ENV:Body>
For a successful job, users in the specified group receive a notification unless they choose not to do so. A report user can indicate whether BIRT iHub notifies him only of successful jobs, only of failed jobs, or of both successful and failed jobs.
When a job fails, BIRT iHub returns an error message and notifies those users who choose to receive a notification of job failure.