Registry Job Command is a command line utility for running various scheduled tasks (Registry Jobs). It is primarily intended to be run via Cron, though it can also be run manually.

Installation

For installation instruction via cron, see New Registry Setup.

Usage

  1. job [-qv] -c <coid> -j <job> [-s] [parameters...]
  2. job [-qv] -r -c <coid> [-m <max>] [-p <parallel>]

where

  • c: Numeric CO ID to process tasks for, or all to process tasks for all COs (--coid)
  • j: The Job Plugin Entry Point Model, of the form Plugin.Model (--job)
  • m: Maximum number of Jobs to process (per Queue Runner) before exiting (--max, default: 100)
  • p: Run queues for multiple COs in parallel (only effective with -c all) (--parallel, default: 1)
  • q: Quiet mode, suppress most output (--quiet)
  • r: Run queued jobs (--run)
  • s: Run the requested Job synchronously (--synchronous)

Understanding Parallel Operations

The -p flag controls how many COs will have their queues processed concurrently, or how many Queue Runners are started at the same time. For deployments with a single operational tenant, setting this flag to anything greater than 1 will have no meaningful effect. For multi-tenant deployments, the maximum suitable value for this flag will be dependent on the processing power of the server infrastructure, and the number of Jobs typically queued by each CO.

The -m flag controls the maximum number of Jobs that each Queue Runner will process before exiting. This flag serves as a safety check to prevent runaway or long running processes, however in a multi-tenant deployment it is possible for a single tenant to "starve" other tenants by queueing a very large number of Jobs. This can be mitigated by setting -p to a sufficiently large value, or by starting Queue Runners specific to each CO (via -c).

If a second cron process starts on the same host before the previous one ends, both processes will continue to run as long as there are available Jobs is the queue. As such, the time between cron runs should be set far enough apart to allow the queue to be fully processed (or the maximum number of Jobs is reached) before the next cron run starts.

If queue runners are started from multiple servers, each will pull Jobs from the same queue. The database will enforce serialization of Job assignment.

Output

Job Command is intended to provide minimal command line output, with actions instead recorded in Registry Job History. Job Command is also recorded to the trace log.

Changes From Earlier Versions

As of Registry v5.0.0

  • Job Command is no longer known as Registry Job Shell.
  • The -c flag must be explicitly provided.
  • Support for -m was added.
  • Support for -p  was added.
  • Serialized queue running via cm_locks was removed, along with -U.


  • No labels