1

I am trying to Schedule a report in BI Publisher through web Service. And I want my report to be scheduled monthly once automatically. I am using Repeat Interval for passing my frequency. But the problem is It accepts the value in milliseconds. So for the month, I can't able to pass such an big value. Is there any other way to solve it?

Somebodies can help me out of it.Thanks in Advance. I have attached my code below.

package BIP;

import BIPschedule.ArrayOfEMailDeliveryOption;
import BIPschedule.DeliveryChannels;
import BIPschedule.EMailDeliveryOption;
import BIPschedule.ReportRequest;
import BIPschedule.ScheduleRequest;

public class ScheduleServiceClient
{
        public static void main(String [] args) throws Exception 
         {
         try
         {
             ScheduleService_Service scheduleService_Service = new ScheduleService_Service();
             ScheduleService scheduleService = scheduleService_Service.getScheduleService();

             // Testing runReport
             System.out.println("Testing runReport Service");


             ReportRequest req = new ReportRequest();
             req.setAttributeCalendar("Gregorian");
             req.setAttributeTimezone("GMT+5:30");
             req.setAttributeFormat("pdf"); //type of the report
             req.setAttributeLocale("en-US"); //Language
             req.setAttributeTemplate("Simple"); //Template type
             req.setReportAbsolutePath("/~weblogic/Customer Details.xdo"); //Absolute path of the report from BIP Catalog.
             req.setSizeOfDataChunkDownload(-1); //to download all

             ScheduleRequest sreq = new ScheduleRequest();
             sreq.setReportRequest(req);  //Set ReportRequest 
             sreq.setSaveDataOption(true); 
             sreq.setDataModelUrl("/~weblogic/Customer_details.xdm");
             sreq.setBookBindingOutputOption(false); 
             sreq.setJobTZ("GMT+5:30");
             sreq.setStartDate("2017-12-18T14:01:00");
             sreq.setEndDate("2017-12-18T14:30:01");
             sreq.setSaveOutputOption(true);
             sreq.setMergeOutputOption(true);
             sreq.setNotifyWhenFailed(false);
             sreq.setNotifyWhenSuccess(false);
             sreq.setNotifyWhenWarning(false);
             sreq.setRepeatCount(5);                                                     
             sreq.setUseUTF8Option(true);
             sreq.setScheduleBurstringOption(false); 
             sreq.setSchedulePublicOption(true); 
             sreq.setUserJobName("Month"); 
             sreq.setRepeatInterval("3600000");


               String job_id = scheduleService.scheduleReport(sreq,"weblogic","weblogic123");
               System.out.println("job_id:"+ job_id);

         }catch (Exception ex){
         ex.printStackTrace();
         } 

         }
}

1 Answers1

0

The recurrence expression is written using cron expressions. Oracle has a support doc with example if you have a support identifier. Oracle Support Document 1537293.1 (How to Schedule a Repeating Job Using The BI Publisher Web Service ScheduleService WSDL)

Also refer: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm