Please enable JavaScript to view this site.

Administration manual

Navigation: Tech Doc

Configuration file

Scroll Prev Top Next More

Certain settings which affect the JobRouter and the connected database are set in a configuration file (<jobrouter>/config/config.php). These are settings such as the database name, the database user or the default path for logging. When installing JobRouter, all necessary settings are automatically written to the file. It is possible to set further settings (e.g. change the log level or activate the display of execution time in the user interface).

The settings are defined as array (from version 5.0.0) or as individual constants. If using the array syntax, the settings are grouped by ranges. The individual ranges correspond to the array keys.

Please note: The configuration files of existing installations are not automatically restructured on update. This should be done manually. The old structure is still supported, but we advise to convert it as soon as possible. The constants for Settings that now use the new structure are marked as obsolete in the overview of constants in the JobRouter Portal. Other constants will be successively transferred to the new structure in later versions.

Please note: The constant CONST_DB_PWD will be discontinued in Version 5.1.0. It will be converted to the new structure in the patch.

Default configuration file from version 5.0.0 (MSSQL Server):

<?php

define('CONST_LOGIN_FUNCTIONS', 0);

define('CONST_CHECK_IP', 0);

define('CONST_LOGGER_DEFAULT_PATH', 'path\\to\\jobrouter\\output\\log\\');

define('CONST_LOG_LEVEL_FILE', 'WARNING');

define('CONST_UNICODE_MODE', 1);

return [

  'db' => [

    'user' => 'dbuser',

    'password' => '*****',

    'server' => 5,

    'host' => 'dbhost',

    'database' => 'EXAMPLEDB',

    'port' => '',

  ]

];

Default configuration file with old structure (MSSQL Server):

<?php
const CONST_DB_USR = 'dbuser';

const CONST_DB_PWD = '*****';

const CONST_DB_SERVER = 5;

const CONST_DB_HOST = 'dbhost';

const CONST_DB_DATABASE = 'EXAMPLEDB';

const CONST_DB_PORT = '';

const CONST_LOGIN_FUNCTIONS = 0;

const CONST_CHECK_IP = 0;

const CONST_UNICODE_MODE = 1;

const CONST_LOGGER_DEFAULT_PATH = 'path\\to\\jobrouter\\output\\log\\';

const CONST_LOG_LEVEL_FILE = 'WARNING';

const CONST_UNICODE_MODE = 1;

The constants can be defined with define or const.

Only the following database settings are currently supported in the array syntax (with key db):

Setting as constant

Setting in configuration array

CONST_DB_USR

user

CONST_DB_PWD

password

CONST_DB_SERVER

server

CONST_DB_HOST

host

CONST_DB_DATABASE

database

CONST_DB_PORT

port

CONST_DB_CHARSET

charset

CONST_DB_EXEC_TIME_LIMIT

execTimeLimit

Additional configuration parameters

In the array, which is returned by the config.php, further parameters can be defined optionally.

Key path

Key

Value

cache

Absolute path to an outsourced cache directory. The General optimization should be considered when choosing a cache directory.

Example:

<?php

 

// ...

 

return [

  'db' => [

    // ...

  ],

  'path' => [

    'cache' => 'C:\Users\example\external-jobrouter-cache'

  ],

];

 

 

Key log

An array with settings referring to the logging.

Key

Value/description

separateLogPerProcessInstance

Disabling of instance-related logging. By default, all instance data are written into the file incident_processid_date.log. By using the value false it is possible to restore the previous conduct with splitted log files (incident.log, step.log, etc.)

If no entry is given or if the value is set on true, one log file will be created per instance.

Example:

<?php

 

// ...

 

return [

  // ...

  'log' => [

    'separateLogPerProcessInstance' => false

  ],

];

Key rabbitmq

An array with the settings for the RabbitMQ connection.

Key

Value

port

Port for the communication (5672 by default or when SSL 15672 is used)

apiPort

Port for calling the RabbitMQ API, e.g. for an Aliveness test (5671  by default or when SSL 15671 is used)

cacert

Path to the SSL certification file

Example:

<?php

 

// ...

 

return [

  // ...

  'rabbitmq' => [

    'port' => 443,

    'apiPort' => 8443,

    'cacert' => '/mnt/certs/cert.pem'

  ],

];

Key feature

An array with features that can be optionally activated or disabled.

Key

Value/description

parallelStepProcessing

Steps are executed in parallel in JobServer by default if the number of steps that need to be performed is exceeding different threshold values. This may lead to a misconduct, which then leads to an error during the processing of the step and which stops the further processing of all steps.

This option facilitates the disabling of the option to process in parallel (set value on false). However, the disabling of the feature leads to slower processing, which basically affects the performance of JobRouter. Therefore, we would suggest to only disable the option until a processing in parallel is possible again. To do so, please remove the key from the configuration array or set the value on true.

Example:

<?php

 

// ...

 

return [

  // ...

  'feature' => [

    'parallelStepProcessing' => false

  ],

];