Name

Jobs — define parameters for batch jobs

SYNOPSIS

key value ...

DESCRIPTION

This directive configures Interchange batch jobs facility. For detailed discussion, please see the jobs glossary entry.

The directive accepts a list of key/value pair and can be specified at both 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 Always search 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 to execute after each invidiual file in the job
autoload None A macro to execute 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   Filters 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

Jobs <<EOJ
  log             logs/jobs.log
  base_directory  jobs
  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.

In that case, 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:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 457

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

Source: lib/Vend/Config.pm
Line 704

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

Source: lib/Vend/Config.pm
Line 3181 (context shows lines 3181-3198)

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!