Scheduler Administration

Starting with Tools 9.2.4, you can start and stop the scheduled notification and orchestration jobs using the Scheduler user interface page in the Orchestrator Studio 9.2.4.0. For information on starting and stopping the notification and orchestration jobs using the Orchestrator Studio, see "Working with Scheduler" in the JD Edwards EnterpriseOne Orchestrator Guide.

Alternatively, you can also use a set of REST APIs for starting, stopping, and managing scheduled jobs.

Schedule REST APIs respect UDO security and feature security. When you start a notification or orchestration job, the user starting the job is authenticated to determine what is started. Only notifications and orchestrations to which that user has access are started.

There is also a REST API you can use for troubleshooting. The List API is similar to a log file in that it contains information such as number of errors, percentage of errors, exception messages, and time to execute for jobs that are currently executing. It does not contain all history like an actual log file would. It only shows the last exception message that occurred.

These are the services you can use to administer the scheduler:

Endpoint

Behavior

<URL>/jderest/v2/scheduler/start

Starts all notifications and orchestrations for which the service caller has permissions.

<URL>/jderest/v2/scheduler/stop

Stops all notifications and orchestrations. They are stopped permanently and will need to be restarted.

<URL>/jderest/v2/scheduler/startjob/ORC_1707250005TOOLS

Starts a single notification. URL ends with /<OMW NAME> (short or long).

<URL>/jderest/v2/scheduler/stopjob/ORC_1707250005TOOLS

Stops a single notification. URL ends with /<OMW NAME> (short or long).

<URL>/jderest/v2/scheduler/list

Use to view runtime information about what is currently running.

<URL>/jderest/v2/scheduler/listJobs (Release 9.2.3.4)

Use to view information about the collection of Notifications and Orchestrations that are scheduled to run, are currently running, or have no schedule attached.

<URL>/jderest/v2/scheduler/listExecuting (Release 9.2.3.4)

Use to view the attributes of all the Notifications and Orchestrations that are currently executing on the server.

<URL>/jderest/v2/scheduler/view (Release 9.2.3.4)

Use to view information about all the Notifications and Orchestrations. You can add an optional parameter of filterScheduled=true which will limit the returned data to Notifications or Orchestrations that have an attached schedule.

<URL>/jderest/v2/scheduler/startJobs (Release 9.2.3.4)

Starts a collection of Notifications and Orchestrations in the scheduler.

<URL>/jderest/v2/scheduler/stopJobs (Release 9.2.3.4)

Stops a collection of Notifications and Orchestrations in the scheduler.

Starting with Tools 9.2.4, the format of "jobname" for an orchestration and a notification is unique with the combination of:

  • Notification ID or Orchestration ID

  • User Name

  • Environment

  • Role

This enables you to execute multiple instances of a job based on the combination of Notification ID or Orchestration ID, User Name, Environment, and Role.

As a result, the services like start, startjob, startjobs, stop, stopjob, stopjobs, view, list, and listjobs will return specific jobs for each unique combination of Notification ID or Orchestration ID, User Name, Environment, and Role.

Example: For the startJob service, endpoint of the URL can be the Notification or Orchestration ID (long or short). However, the job that the service starts is unique to the Notification or Orchestration ID along with the authenticated user, environment, and role.

When you enter the endpoint of the URL as the Notification or Orchestration ID for the stopJob service, all the instances of the jobs with the specified Notification or Orchestration ID are stopped. A job name can be passed as NTF/ORCH_ID.USER.ENV.ROLE (such as: NTF_1903210002JDE.ABC.JDV920.*ALL) to stop a specific job.

An error message is returned when you start a job that is already running. You have to manually stop the job before the job with the same Notification or Orchestration ID, user, environment, and role can be started.

A resilient scheduler can be started and stopped while not affecting the jobs that have previously been scheduled to run.

Starting and stopping scheduler instances are done with these services:

Endpoint

Behavior

<URL>/jderest/v2/scheduler/startSchedulers

Start a collection of schedulers, one per AIS host.

<URL>/jderest/v2/scheduler/startScheduler

Start a scheduler - the AIS server where the service is running is the scheduler host.

<URL>/jderest/v2/scheduler/stopSchedulers

Stop a collection of schedulers, one per AIS host.

<URL>/jderest/v2/scheduler/stopScheduler

Stops a scheduler. The AIS server where the service is running is the scheduler host.

<URL>/jderest/v2/scheduler/pingSchedulers

Check whether a collection of schedulers are up, one per AIS host.

<URL>/jderest/v2/scheduler/pingScheduler

Checks whether the scheduler is up. The AIS server where the service is running is the scheduler host.

All of these services use the same service body. A single schedulerHost is valid.

Service Body

{
            	"username": "<user>",
            	"password": "<password>",
            	"environment": "<environment>",
            	"role": "<role>",
            	"scheduleIntervalMinutes": 1,        	
            	"schedulerHosts": [{
                       "protocol": "<protocol>",
                       "host": "<AIS host>",
                       "port": "<port>"
                            	},
                   {
                       "protocol": "<protocol>",
                       "host": "<AIS host 2>",
                       "port": "<port>"
                            	}
 
                    	]
       }   
Note: If you have not configured scheduler resilience, jobs are run on a single instance and are volatile. Stopping the AIS Server or the scheduler causes the jobs to be cleared. Without resilience, multiple schedulers should not be started because they will duplicate the notification and orchestration executions from the other scheduler instances.

For more information on REST APIs used for starting, stopping, and managing the scheduler, see "Scheduler Service" in the JD Edwards EnterpriseOne Tools REST API for the Application Interface Services Server Guide.