Child pages
  • Registry Installation - Cron
Skip to end of metadata
Go to start of metadata

Create cron tasks

COmanage Registry uses a shell command to facilitate certain automatic processing. To enable this, it is recommended that the shell command be run periodically from cron. (The shell command can also be run manually if needed.)

(warning) The cron command should run as the web server user in order to avoid problems with file permissions.

More sophisticated usage patterns than those described here are possible, depending on the requirements of a given deployment. See Registry Job Shell for more information.

Registry v3.3.0 and Later

Certain actions (such as reprovisioning all records or bulk assignment of identifiers) are now queued by the web interface for asynchronous processing by Job Shell. The queue should be processed frequently enough to meet organizational needs. If there are no jobs in the queue, the cron process will exit quickly. If an existing process is already running for a given CO, subsequent processes will detect that and exit. As such, it is reasonable to run the queue frequently, even as often as once per minute or once per few minutes.

Currently, the command must be configured for each CO.

The cron command might look something like this:

# Run the job queue for CO 1 every 5 minutes
0/5 * * * * cd /path/to/registry-source/app && Console/cake job -q -r -c 1
# Run the job queue for CO 2 every 5 minutes, but 2 minutes later than for CO 1
2/5 * * * * cd /path/to/registry-source/app && Console/cake job -q -r -c 2

Additionally, until Registry v4.0.0 the cake job command described for Prior Registry Versions (below) should also be configured. A complete crontab might look this this:

# Crontab for http user
# Run the job queue for CO 1 every 5 minutes
0/5 * * * * cd /path/to/registry-source/app && Console/cake job -q -r -c 1
# Run the job queue for CO 2 every 5 minutes, but 2 minutes later than for CO 1
2/5 * * * * cd /path/to/registry-source/app && Console/cake job -q -r -c 2
# Deprecated job to run expirations, syncorgsources, and groupvalidity tasks (until Registry v4.0.0)
0 1 * * * cd /path/to/registry-source/app && Console/cake job -q

Prior Registry Versions

The cron command should look something like this:

0 1 * * * cd /path/to/registry-source/app && Console/cake job -q

(warning) Prior to v2.0.0, the command was cake cron, not cake job.

This will run automatic processing every morning at 1am. -q will suppress any non-critical messages.

See Also

Next: Registry Installation - Testing

  • No labels