Registry Jobs

Registry Jobs

Registry Jobs are processes designed to be run asynchronously, usually via cron, intended to handle large operations not suitable for a single web transaction. Jobs were originally introduced in Registry v0.9.2 as CronShell, and in v2.0.0 were migrated to JobShell. As of Registry v3.3.0, Jobs are implemented via plugins (except for some existing Jobs, which will migrate to plugins in Registry v4.0.0, CO-1310).

Jobs are processed via Job Shell, and a Job can be run synchronously (from the command line), or it can be scheduled for asynchronous processing (via cron). When Jobs are run asynchronously, Job Shell will process all queued Jobs for a given CO sequentially in the order they were queued. It is not possible to queue two instances of the same Job within a CO. It is not currently possible to process Jobs within a CO in parallel, or to prioritize some Jobs over others.

Registry Job Shell

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

(info) Prior to v2.0.0, JobShell was known as CronShell.

Installation and Running

For installation instruction via cron, see Registry Installation - Cron.

To run JobShell manually, the usage is

JobShell Usage

$ cd ${REGISTRY_SRC}/app
$ su -c "./Console/cake job ${ARGS}" ${APACHE_USER}
(warning) After running JobShell, it may be necessary to manually clear or change ownership on cache files, especially if the command is not run as the Apache user.

Arguments

(info) Registry v3.3.0 introduces Job Plugins. Existing tasks will remain available until Registry v4.0.0 (CO-1310), at which time they will be converted to Job Plugins.

Usage:

  1. job [-hqv] [-c coid] [task] [task...]
  2. job [-hqv] -r -c coid
  3. job [-hqv] -s job -c coid [params...]
  4. job -U lockid

Usage 1 is deprecated, and will be removed in Registry v4.0.0. Usages 2, 3, and 4 are available since Registry v3.3.0.

Where:

  • c: Numeric CO ID to process tasks for (default: All COs) (–coid)
  • h: Display help (–help)
  • q: Quiet mode, suppress most output (–quiet)
  • r: Run queued jobs (–runqueue)
  • s: Run the specified job synchronously (–synchronous)
  • U: Remove the specified lock ID (–unlock) (use to clear stale locks)
  • v: Verbose mode, enable additional output (–verbose)
  • job: Job to run, corresponding to the prefix of the plugin name (eg: for the plugin ProvisionerJob, the job is provisioner).
  • params: Job-specific parameters
  • task: Task or tasks to run (default: All available tasks)

(warning) JobShell is designed to provide minimal command line output, with actions instead recorded in Registry Job History.

Tasks

The following tasks are supported by Job Shell:

  • expirations: Run Expiration Policies.
    • In most cases, it makes sense to run expirations once per day, as this task is primarily useful for expirations driven by calendar dates. However, if your deployment includes business processes that manually manage criteria for expiration (eg: expiration driven by moving a record to a different COU) you may wish to run expirations more frequently.
  • forcesyncorgsources: Sync Organizational Identity Sources. Available as of Registry v3.2.0.
  • groupvalidity: Reprovision records to due Group Validity. Available as of Registry v3.2.0.
    • When a CO Group Member valid from or valid through date takes effect, this task is used to reprovision affected records. When executed, the task will reprovision any record associated with a CO Group Membership whose valid from or valid through date is within the last x minutes, where x is set via the CO Setting Group Validity Sync Window. The default value for this setting is 1440 minutes (or 1 day), and so typically it would make sense to run this task once per day, perhaps just after midnight. However, it may make sense to run this task more frequently, depending on how your deployment uses these dates.
  • syncorgsources: Sync Organizational Identity Sources.

Monitoring

Job status maybe monitored via the web interface by CO Administrators, via the Jobs menu item. An in progress job may be canceled via the Job details view.

(warning) Expirations do not currently support monitoring. (CO-1385)


Copyright (C) 2018-2020 University Corporation for Advanced Internet Development (Internet2) - All Rights Reserved