Name

Jobs — define parameters for batch jobs

SYNOPSIS

key value ...

DESCRIPTION

This directive configures Interchange batch jobs facility. It accepts a list of key/value pairs.

It can be specified at both the global and catalog level.

The available keys for the global directive are:

Key Default Description
MaxLifetime 600 The maximum time (in seconds) that a job will be allowed to run.
MaxServers 1 The maximum number of servers processing jobs. Excess jobs will be queued.
UseGlobal false Search always for global job definitions.

The available keys for the catalog directive are:

Key Default Description
add_session false Add session dump to job output.
autoend None A macro executed after each invidiual file in the job.
autoload None A macro executed before each invidiual file in the job.
base_directory etc/jobs Directory to search for batch jobs.
email None Email job output to this address.
extra_headers None Additional email headers.
from MailOrderTo "From" address in emails.
ignore_errors false Excludes fatal errors from job output.
filter strip Filter(s) applied to job output.
initialize None A macro executed before the job commences.
log None Write job output to this logfile.
subject Interchange results for job: %s Subject for emails, including placeholder for job name.
suffix None Restrict job to files matching the specified suffix.
trackdb None Table for tracking jobs.
use_global false Search for global job definitions.

For more information about Interchange batch jobs see jobs glossary entry.

DIRECTIVE TYPE AND DEFAULT VALUE

Global directive,
Catalog directive

EXAMPLES

Example: Define catalog-level Jobs directive

Specify directory that will hold the job files, and set up a log file to for job runs. Also specify an email address to which any output jobs output will be sent:

Jobs <<EOJ
  base_directory  jobs
  log             logs/jobs.log
  email           root@myhost.mydomain.local
EOJ

Example: Run jobs manually

Invoke from the command line:

su -c '/PATH/TO/interchange --quiet --runjobs=CATALOG_NAME=DIRECTORY_NAME' USERNAME

Example: Run jobs automatically from Unix crontab

12 2 * * * su -c '/PATH/TO/interchange --quiet --runjobs=CATALOG_NAME=DIRECTORY_NAME' USERNAME

NOTES

Files in the jobs directory that end in HTMLsuffix will be silently ignored.

The invocation of jobs from the command line will only queue them for execution and will return the shell prompt before the jobs have actually started executing.

A common temporary session (mv_tmp_session == true) will be created for use by all of the files in the job queue. The session will be closed when the jobs complete. The remote IP address will be set to none and the user agent string will be set to commandline.

AVAILABILITY

Jobs is available in Interchange versions:

5.0.1-5.7.0 (cvs-head)

SOURCE

Interchange 5.7.0:

Source: lib/Vend/Config.pm
Line 457

['Jobs',        'hash',           'MaxLifetime 600 MaxServers 1 UseGlobal 0'],

Source: lib/Vend/Config.pm
Line 698

['Jobs',        'hash',           ''],

Source: lib/Vend/Config.pm
Line 3132 (context shows lines 3132-3149)

sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
  return $HashDefaultBlank{$item} ? '' : {};
}

my $c;

if(defined $C) {
  $c = $C->{$item} || {};
}
else {
  no strict 'refs';
  $c = ${"Global::$item"} || {};
}

return hash_string($settings,$c);
}

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!