You can use WebTools and HTML forms to run a Service asynchronously either one time or on a recurring basis. The following demonstrates the steps necessary to schedule testScv
to be executed one time, asynchronously, as a scheduled job.
Navigate directly to the Schedule Job web page.
~https://localhost:8443/webtools/control/scheduleJob
To execute testScv
asynchronously follow, these steps:
Field |
Usage |
---|---|
Pool |
By default, only one thread pool, called pool, is configured. To add more thread pools, see the |
Frequency |
A frequency of None tells OFBiz to run this Service once. |
Interval |
Interval is used with frequency to indicate how many times to invoke the Service. |
Count |
-1 indicates forever. Any valid integer is acceptable here. |
testScv
will be scheduled to run at the specified time.Scheduled Services are run asynchronously from the calling program. As such, requests for scheduling are handled by the OFBiz job scheduler. Each scheduled Service is assigned a unique job identifier (jobId
) and execution pool by the job scheduler. After the Service is scheduled for execution, control returns to the calling program.
Using the OFBiz job scheduler Job List web page, you may find all scheduled jobs. In the following screenshot, testScv
is shown as scheduled for execution on the Job List Search Results web page as specified in the recipe:
Because the testScv
only writes output to the logfile, we may verify successful execution and scheduling by observing the ofbiz.log
runtime logfile as shown:
3.15.221.133