Scheduling Jobs
Purpose: You can use the job scheduler to schedule when a periodic process runs. You can define a periodic process to run once, daily, weekly, monthly, yearly, or at the start or end of a month.
In this topic:
How to Schedule a Job
Purpose: Use the following steps to schedule a periodic process to run based on a defined schedule.
-
Use the Working with Periodic Functions (WPER) menu option to create a periodic function for the job you wish to execute. See Periodic Functions Available to Schedule for a list of periodic functions that you may wish to schedule.
-
Use the Working with Periodic Processes (WPPR) menu option to assign the periodic function(s) to a periodic process.
-
Once you have created the periodic process, you can use the Execute Periodic Process screen (located in the Working with Periodic Processes (WPPR) or Executing Periodic Processes (EPRO) menu option) to define a schedule for the job. See Defining the Job Schedule.
Execute process through web service: You can also use the CWProcessIn message or the ProcessIn message to start a periodic process. See Using the CWProcessIn Message to Start a Periodic Process or Using the ProcessIn REST Message to Start a Periodic Process in the Order Administration Web Services Guide on My Oracle Support (ID 2953017.1) for more information.
Execute process on server startup: You can also schedule a periodic process and its assigned periodic functions to start on server startup. See Running a Periodic Process on Server Startup for more information.
Defining the Job Schedule
Use the Execute Periodic Process screen (located in the Working with Periodic Processes (WPPR) or Executing Periodic Processes (EPRO) menu option) to define a schedule for a periodic process.
# | Step |
---|---|
1. |
At the Execute Periodic Process screen, enter a valid company code in the Company field. |
2. |
Enter a valid job queue in the Job queue field. If you leave this field blank, the system submits the periodic process to QBATCH. Note: If you wish to run the job in a designated queue, define that queue. Use the PICKGEN job queue when scheduling pick slip generation or deposits. |
3. |
Select when to execute the periodic process using the Frequency field.
See Periodic Process Scheduling Examples for examples of how to schedule a periodic process. |
4. |
The Frequency field indicates which Scheduling fields are required, based on the frequency option you select:
|
5. |
If you enter a value in any of the Scheduling fields that is not required for the frequency you selected, the system ignores those entries when executing the periodic process. For example, if you select Now for the Frequency and also enter a value in the Weekly field, the system executes the periodic process immediately and ignores the value in the Weekly field. |
6. |
Select OK to advance to the Second Execute Periodic Process Screen. At this screen, you can select the functions within the process to execute.
|
Periodic Process Scheduling Examples
The table below provides examples of how to define a schedule for a periodic process.
Schedule | Procedure |
---|---|
Execute the periodic process immediately. |
Select Now for the Frequency. The system submits the job to the specified job queue for the user that executed the periodic process. Note: Because the process is executed immediately, the system does not add the periodic process to the job scheduler. |
Execute the periodic process tonight at 7 PM. Do not run the process any other night. Example: End asyncs tonight at 7 PM. |
|
Execute the periodic process today at 3 PM and tomorrow at 8 AM. Do not run the process at any other time. Example: Run a status report today at 3 PM and again tomorrow at 8 AM. |
Note: You need to create more than one schedule for the periodic process. First Schedule:
Second Schedule:
|
Execute the periodic process every morning at 6 AM. Example: Start asyncs every morning at 6 AM. |
|
Execute the periodic process every morning, except Saturdays and Sundays, at 6 AM. Example: Start the asyncs every morning during the work week at 6 AM. |
Note: You need to create more than one schedule for the periodic process. First Schedule:
Second Schedule:
Third Schedule:
Fourth Schedule:
Fifth Schedule:
|
Run the periodic process every week on Mondays at 10 AM. Example: Run the weekly status reports every Monday at 10 AM. |
|
Run the periodic process every month on the 25th day of every month at 7 PM. Example: Run the monthly status reports on the 25th day of every month at 7 PM. |
|
Run the periodic process on the first day of every month at 8 AM. Example: Run the monthly status report on the first day of every month at 8 AM. |
|
Run the periodic process on the last day of every month at 9 PM. Example: Run the monthly status report on the last day of every month at 9 PM. |
|
Scheduled Jobs Screen
Overview: Use this screen to review the periodic processes scheduled to run at a specified time.
Note:
Any job monitor rules scheduled to run at a specified time also display on this screen; see Monitoring Jobs.
How to display this screen: Select Scheduled Jobs at the Commands screen.
To advance to the Commands screen:
-
Select the My Jobs icon (
) in the upper right area of a screen) to advance to the Job Management screen.
-
At the Job Management screen or other Admin screen (such as the About Application, Forms Management Screen, User Control, or System Messages screens), select Advanced Commands to advance to the Commands screen.
Note:
The Advanced Commands option will not display if you do not have authority to advanced commands; see User Configuration in the Administration Guide for more information on setting a user’s password and system authority.
Field | Description |
---|---|
Job name |
The name of the periodic process or job monitor rule that is scheduled to run at a specified time. Alphanumeric, 10 positions; display-only. |
Schedule |
A description of when the periodic process is scheduled to run. This description is based on the Frequency you defined for the periodic process.
Alphanumeric, calculated by the system; display-only. |
Next run |
The date and time the periodic process will next be executed. UNKNOWN displays if someone has deactivated the job scheduler. Alphanumeric, calculated by the system; display-only. |
Last run |
The date and time the periodic process was last executed. UNKNOWN displays if:
Alphanumeric, calculated by the system; display-only. |
Status |
The current status of the scheduled job. Valid values are:
Alphanumeric, 8 positions; display-only. |
User |
The user ID of the user that scheduled the periodic process. Note: When the system executes the periodic process, the system submits the job to the specified job queue using the name of the user that scheduled the job. Alphanumeric, 10 positions; display-only. |
Screen Option | Procedure |
---|---|
Delete a periodic process that is scheduled to run |
Select Delete for a scheduled job to remove it from the scheduler. The periodic process will no longer display in the list of scheduled jobs. If you wish to reschedule the job, you will need to use the First Execute Periodic Process Screen (Setting Parameters) to create a new job schedule. |
Deactivate each job in a scheduled status that is scheduled to run |
Select Deactivate Schedule. The system:
Note:
|
Activate each job in an Inactive status that is scheduled to run |
Select Activate Schedule. The system:
|
Refresh job schedule on the screen |
Select Refresh Schedule. The system:
|
Display information about Order Administration |
Select About. |
Advance to the Document Management Screen |
Select My Docs. |
Advance to the Forms Management Screen |
Select My Forms. |
Advance to the Job Management screen |
Select My Jobs. |
Advance to the Advanced Commands screen, where you can advance to additional commands |
Select Advanced commands. |
Return to the main menu |
Select Exit. |
Scheduled Jobs Troubleshooting
Scheduled Jobs Log
Order Administration writes a message to the Application log (APP.log) when:
-
you add a periodic process to the job scheduler
-
you remove a periodic process from the job scheduler
-
you deactivate the job scheduler
-
you activate the job scheduler
-
the job scheduler executes a scheduled periodic process and updates the next time the job is scheduled to run
-
an error occurs during job scheduling
See Using the JOBCLN Function to Resolve Job Status Across Servers for information on using the JOBCLN function to regulate and correct running jobs.
Troubleshooting Questions
Some possible troubleshooting questions and answers are:
Question | Possible Answer(s) |
---|---|
The Scheduled Jobs screen does not display my periodic process. |
|
Why is the Last run field set to UNKNOWN? |
|
Can I delete all jobs from the scheduler? |
You must delete each job from the scheduler individually. |
I created a periodic process to stop and restart asyncs, and asyncs did not start correctly. |
Do not create one periodic process to stop and restart asyncs. You need to allow a certain amount of time for the system to completely stop the aysncs before restarting the asyncs. Instead, create one periodic process to stop the asyncs and create a separate periodic process to start the asyncs. Depending on the typical amount of transactions that need to be processed before the asyncs can end, you should allow 5 - 30 minutes between stopping the asyncs and starting the aysncs. |
It looks like my scheduled job ran at the correct time, but I don’t see the expected results. Example: Asyncs were scheduled to start at 7AM this morning, but they are still inactive at 8AM. |
Make sure that the submitted job is not waiting to run behind another job in the queue. When the system executes a scheduled job, the job is placed in the specified job queue for the user that scheduled the job.
Note: If the scheduled job is to start or end asyncs, but the asyncs are already started or stopped, the scheduled job will run, but do nothing since the asyncs are already in the correct status. |
Can I change the parameters of a scheduled job? |
No, if you wish to change the parameters of a scheduled job, such as adding or removing a periodic function from the process, changing the scheduled time, or changing the job queue, you will need to remove the scheduled job from the job scheduler and create a new schedule for the job. |
Why is my scheduled job in an error status? |
Note: The system writes a description of the error to the Application log (APP.log). |
Using the JOBCLN Function to Resolve Job Status Across Servers
Use the JOBCLN periodic function resolve job status across all servers for batch jobs.
When to use? You might run the JOBCLN function when:
-
When a server shuts down unexpectedly.
-
Whenever a job status does not appear correct or consistent.
You can also include the JOBCLN function as the first job run through a periodic process that starts other functions for a server restart.
The JOBCLN function resolves status for jobs running through the following options:
-
Background Job Control (MBJC): see Running the JOBCLN Periodic Function to Correct the Async Jobs for details.
-
Working with Drop Ship Background Jobs (WPBJ): See Troubleshooting the CDC Async Job for details.
-
Working with Integration Layer Processes (IJCT): See Using the JOBCLN Function to Troubleshoot IJCT Jobs for details.
-
Other jobs: The JOBCLN function does the following:
-
For all other batch jobs at the Job Management (My Jobs) screen in RUN, MSG, ERR, and RMV status, confirm whether they are actually running, and if not:
-
Update the status to END.
-
Delete all Active Procedures (MACX) records.
-
-
For any batch jobs in the above statuses that are actually running, update the status to RUN and create an active procedure if needed..
-
For any batch jobs that are not actually running, do the following:
-
Update the job status to END.
-
Delete each corresponding Active Procedure (MACX) record if one exists.
-
-
For all active procedures related to these batch jobs (see Purge Active Procedures Across Users (MACX)):
-
If the related job is in END status, delete the active procedure.
-
If the job is not in END status and is not displayed in Display Active Batch Jobs (DABJ), delete the Active procedure.
-
-
Note:
The JOBCLN function does not update interactive user sessions (in the oms.job.queue.interactive job queue).
Authority required to run JOBCLN: To submit the JOBCLN periodic function, a user must be flagged as a Security Administrator, with a User Rank of 1.
Deleting an active procedure: When the JOBCLN function deletes an active procedure, it creates a User Audit record. See Tracking User, Authority, and Password Updates for more information on the User Audit table.
Multiple billing async jobs? If the Number of Billing Async Jobs to Start (F08) specifies to start more than one billing async job, you will need to end the async jobs manually and then restart them in order to launch the specified number of billing async jobs.