How to Set a Scheduler Job to Submit a UBE Every 5 Minutes for a Specific Time Range
Purpose of Document
This document discusses a possible way to implement a scheduled job for a specific time range through a custom routine. There may be a need to set up Schedule Job for a specific time range (for example, 07:00 a.m. through 07:00 p.m.) to call a certain UBE every 5 minutes.
This note explains all possible ways to implement a scheduled job for a specific time range for these reasons:
Business Requirement: A certain job has to be running during office hours based on transaction end-user performance. So any type of system level tasks can be performed after office hours without affecting a schedule job set. Through this scheduled job can be set through the batch job.
Technical Specification: Before creating a custom UBE, analyze the exiting routing through standard Scheduler application P91300 (Schedule Jobs). To currently set a scheduled job at least two tables F91300 (Schedule Job Master) and F91320 (Job Schedule) will be populated. So this routine will populate these two tables which can be handled by the Scheduler Kernel and Queue Kernel.
Create a Schedule Job in P91300 (Work with Scheduled Jobs) to populate F91300. For example, R47041 (EDI_Inbound)
Determine how many recurrences for the need to be created. Example: in a 12 hour period, the schedule the job would run 144 times, if it needs to run every 5 minutes.
Call B980009 (GetUTCTime) to get "VA evt_SchedulerStartTime"
Call N91300A (CommitRecurrencPatternToDB). This BSFN determines and adds records for the job to F91320.
Set schedule for UBE1 created here before 07:00 a.m. with recurrence of A day
Notes:
For this example, 2 UBEs are created. Step 2, 3 and 4 are for the actual UBE which has the routine to write F91320 and step 5 is another UBE that calls the main UBE
The actual routine to populate Job Schedule is NER N91300A (Step 4)
Step 1 populates F91300
Step 1, 2, 3 gets parameters in calling NER N91300A
The second UBE job (Step 5) can be set to run everyday except Saturday and Sunday through Scheduler
Code Example:
Assign (or get is from Processing Options) ScheduleJobName
Set ScheduledStartTime (format hhmmss) either hard code or processing options
Get/Assign Max records as computed above (depending on recurrence and time gap, this value can vary)
VA rpt_ScheduledJobName = "EDI_Inbound" VA evt_ScheduledStartTime = "070000" VA evt_MaxScheduledRecords = "144"
Get recurrence Type and Timezone F91300.Fetch Single VA rpt_ScheduledJobName = TK Scheduled Job Name VA evt_RecurrenceType <- TK Recurrenc Type VA evt_TimeZoes <- TK Time Zone List
Get UTC time to assign start time
Get UTC Time (B9800009 - GetUTCTime) VA evt_SchedulerStartTime <- BF mnUTCTime SL DateToday -> BF jdDate VA evt_ScheduledStartTime -> BF mnTime "2" -> BF cUTC_Local VA evt_TimeZoes -> BF szTimeZone "1" -> BF cDaylightSavings
Create F91320 (Job Schedule)
Determine and add F91320 Records for Job (N91300A - CommitRecurrencPatternToDB) VA rpt_ScheduledJobName -> BF szScheduledJobName VA evt_SchedulerStartTime -> BF mnSchedulerStartTime VA evt_RecurrenceType -> BF szRecurrenceType VA evt_TimeZoes -> BF szTimeZones VA evt_DaylightSavings -> BF cDaylightSavings /* same with processing option value of P91300 */"5" -> BF mnScheduledMinutes VA evt_MaxScheduledRecords -> BF mnMaxScheduledRecords "2" -> BF cYesOrNoEntry /* Local or UTC */
Disclaimers:
The following is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle's products remains at the sole discretion of Oracle.
This solution is a custom modification that is not supported by Oracle's Global Support. It is provided as an example of how the software could be modified to have this functionality.