1.4 factory.ini File

The factory.ini file contains settings for the Job Scheduler. Note that empty settings are ignored and do not overwrite those made in the .

The location of this file can be specified when starting the Job Scheduler using the -ini option. For example,

scheduler installation path…\bin\scheduler.exe -ini=C:/Programme/scheduler/config/factory.ini

During installation of the Job Scheduler, the factory.ini file is saved in the

scheduler installation path…\config

directory. Calls using the Job Scheduler start script then automatically set the path to this file correctly.

If the path to the factory.ini file is not specified when calling the Job Scheduler, then the Job Scheduler will attempt to find it by looking according to the following criteria:

This file should be saved under Windows in the folder in which Windows expects to find the .ini files. Normally this is the c:\windows folder. Otherwise the file will be sought in the users' home directory.

Settings

Section: java

class_path = class_path for Java

This file is used to extend the class_path of directories or jars which are only valid for the Job Scheduler. This setting precedes changes in the sos.ini (section [java], entry class_path= …) file.

Section: job

history = yes|no Write history?

Specifies whether a task history should be written. If yes, then the Job Scheduler makes an entry in the database for every task carried out. Should the Job Scheduler not be using a database, this entry will be made in a file specified in the -log-dir directory.

The factory.ini (section [spooler], entry history= yes) setting is overwritten by this parameter.

history_archive = yes|no|gzip Archive history files?

This option causes the Job Scheduler to archive and compress the history files with gzip after its last run, should the Job Scheduler be writing the history in files and not in a database.

The factory.ini (section [spooler], entry history_archive= no) setting is overwritten by this parameter.

history_columns = name, name, ... Additional columns in the history

A task using the Task.set_history_field() method can include fields specified here in the database table.

The factory.ini (section [spooler], entry history_columns= …) setting is overwritten by this parameter.

history_file = file_name Name of the History File (for operation without a database)

Should the parameter history=yes be set and the scheduler not be using a database, then it will make an entry in this file for each task carried out. If no name is specified for the history file, then the Job Scheduler will use its own name. Note that the Job Scheduler will only write a history when the -log-dir option is set.

The factory.ini (section [spooler], entry history_file= …) setting is overwritten by this parameter.

history_on_process = yes|no|number Write history entry after calling spooler_process()?

Should the Job Job Scheduler be writing a history, then the settings history_on_process=no or =0 cause it to make an entry in the history at the start of a task.

When history_on_process=yes or =1 then Job Scheduler only makes an entry after spooler_process() has been called. This means that no entry will be made, when spooler_open() returns false.

When a number is specified in this setting (history_on_process=x), the Job Scheduler makes an entry in the history only after the x-th execution of spooler_process() .

The factory.ini (section [spooler], entry history_on_process= 0) setting is overwritten by this parameter.

Messages

[ERROR]

SCHEDULER-335

Only "yes", "no" and a number are allowed with ="": error 

history_with_log = yes|no|gzip Write a protocol in the history?

The Job Scheduler can add the task protocol to the history when the history is being recorded in a database, if required, compressed with gzip. (Here it is important to check that the protocol - which is saved in binary format - can be decompressed after being saved in the database.)

See the command: <show_task what="log"> .

The factory.ini (section [spooler], entry history_with_log= no) setting is overwritten by this parameter.

log_level = log_level Limit protocol level

Defines the level with which protocol entries should be written. Every protocol entry is given one of the following categories: error, warn, info, debug1 to debug9 (debug1 is the same as debug).

The -log-level option has precedence over this parameter.

The factory.ini (section [spooler], entry log_level= info) setting is overwritten by this parameter.

log_mail_bcc = email_address E-mail bcc recipient

The factory.ini (section [spooler], entry log_mail_bcc= …) setting is overwritten by this parameter.

log_mail_cc = email_address E-mail cc recipient

The factory.ini (section [spooler], entry log_mail_cc= …) setting is overwritten by this parameter.

log_mail_from = email_address E-mail sender

The factory.ini (section [spooler], entry log_mail_from= …) setting is overwritten by this parameter.

log_mail_subject = text E-mail subject

The factory.ini (section [spooler], entry log_mail_subject= …) setting is overwritten by this parameter.

log_mail_to = email_address E-mail recipient

The factory.ini (section [spooler], entry log_mail_to= …) setting is overwritten by this parameter.

mail_on_delay_after_error = Suppress <delay_after_error>

Prerequisite: mail_on_error=yes or mail_on_warning=yes

This setting reduces the numerous e-mails after a job is restarted by way of <delay_after_error> .

This setting only works when <delay_after_error> has been set for as job. Should this not be the case, then mail_on_delay_after_error=all applies.

The factory.ini (section [spooler], entry mail_on_delay_after_error= first_and_last_only) setting is overwritten by this parameter.

mail_on_error = yes|no Send an e-mail should a task end with an error

The factory.ini (section [spooler], entry mail_on_error= no) setting is overwritten by this parameter.

mail_on_process = yes|no|number Send an e-mail at the start of a task using spooler_process()

Causes the task log to be sent when a task has completed at least the specified number of steps - i.e. calls of spooler_process() . Because non-API tasks do not have steps, the Job Scheduler counts each task as a single step.

yes corresponds to 1, no corresponds to 0.

The factory.ini (section [spooler], entry mail_on_process= 0) setting is overwritten by this parameter.

mail_on_success = yes|no Send an e-mail on successful completion of a task

The factory.ini (section [spooler], entry mail_on_success= no) setting is overwritten by this parameter.

mail_queue_dir = directory Directory for e-mails which temporarily cannot be sent

E-mails which cannot be sent (because, for example, the SMTP server cannot be contacted) are stored in this directory.

In order to send these e-mails later it is necessary to write a job which calls up the Mail.dequeue() method.

This setting is generally made in sos.ini (section [mail], entry queue_dir= …).

Environment variables (e.g. $HOME) are replaced by this attribute (see Settings which Allow Environment Variables to be Called).

The factory.ini (section [spooler], entry mail_queue_dir= …) setting is overwritten by this parameter.

The sos.ini (section [mail], entry queue_dir= …) setting is overwritten by this parameter.

smtp = host_address E-mail SMPT server hostname or IP number

These settings are generally made using sos.ini (section [mail], entry smtp= …).

smtp=-queue stops e-mails being sent. Instead mails are written into the file specified in queue_dir. See also sos.ini (section [mail], entry queue_only= …).

The factory.ini (section [spooler], entry smtp= …) setting is overwritten by this parameter.

The sos.ini (section [mail], entry smtp= …) setting is overwritten by this parameter.

Section: smtp

mail.smtp.password = password Password for Authentification on an SMTP Server

The password is sent together with the mail.smtp.user entry when registering on an SMTP server in order to be able to send e-mails.

mail.smtp.user = name Name for Authentification on an SMTP Server

Section: spooler

config = file_name Configuration file

Defines the Configuration File.

The -config option has precedence over this parameter.

db = connection_string Database connection string

The database connection string for the history. Should no value be specified here, then the files will be saved in .csv format. See factory.ini (section [spooler], entry history_file= …).

A simple file name ending in .mdb (e.g. scheduler.mdb) can also be specified here when the Job Scheduler is running on Windows. The Job Scheduler then uses a Microsoft MS Access database of this name, which is located in the protocol directory (see the option -log-dir ). Should such a database not exist, then the Job Scheduler will create this database.

The Job Scheduler automatically creates the tables necessary for this database.

Example:

;    SQL Server 2000 via msbase.jar, msutil.jar, mssqlserver.jar
db = jdbc -class=com.microsoft.jdbc.sqlserver.SQLServerDriver jdbc:microsoft:sqlserver://localhost:1433;selectMethod=Cursor;databaseName=scheduler -user=scheduler -password=secret
;    SQL Server 2000, 2005 via sqljdbc.jar
db = jdbc -class=com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc:sqlserver://localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler -user=scheduler -password=secret

;    MySQL 4.1.7, 5.x
db = jdbc -class=com.mysql.jdbc.Driver jdbc:mysql://localhost/scheduler:3306 -user=scheduler -password=secret

;    Oracle 8.1.7, 9i, 10g
db = jdbc -class=oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@localhost:1521:orcl -user=scheduler -password=secret

;    PostgreSQL 8.x
db   = jdbc -class=org.postgresql.Driver jdbc:postgresql://localhost:5432/scheduler -user=scheduler -password=secret

;    IBM DB2 8
db   = jdbc -class=com.ibm.db2.jcc.DB2Driver jdbc:db2://localhost:50000/scheduler:driverType=2;retrieveMessagesFromServerOnGetMessage=true; -user=scheduler -password=secret

;    Firebird 1.5
db   = jdbc -class=org.firebirdsql.jdbc.FBDriver jdbc:firebirdsql://localhost:3050/scheduler -user=scheduler -password=secret

;    ODBC
db = odbc -db=scheduler_datasource -user=scheduler -password=secret

;    MS Access Datenbank
db = scheduler.mdb

db_check_integrity = yes|no

The Job Scheduler carries out additional database integrity tests.

db_history_table = name Name of the history database table

See also Spooler.db_history_table_name()

db_members_table =

db_order_history_table = name Name of the order history database table

See also Spooler.db_order_history_table_name()

db_order_step_history_table = name Name of the database table containing the steps in the order history

db_orders_table = name Name of the order database table

See also Spooler.db_orders_table_name()

db_tasks_table = name Name of the task database table

See also Spooler.db_tasks_table_name()

db_variables_table = name Name of the Job Scheduler internal variable database table

The Job Scheduler records internal counters, for example, the ID of the next free task, in this database table.

See also Spooler.db_variables_table_name()

history = yes|no Write history?

Specifies whether a task history should be written. If yes, then the Job Scheduler makes an entry in the database for every task carried out. Should the Job Scheduler not be using a database, this entry will be made in a file specified in the -log-dir directory.

The factory.ini (section [job], entry history= yes) setting has precedence over this parameter.

history_archive = yes|no|gzip Archive history files?

This option causes the Job Scheduler to archive and compress the history files with gzip after its last run, should the Job Scheduler be writing the history in files and not in a database.

The factory.ini (section [job], entry history_archive= no) setting has precedence over this parameter.

history_columns = name, name, ... Additional columns in the history

A task using the Task.set_history_field() method can include fields specified here in the database table.

The factory.ini (section [job], entry history_columns= …) setting has precedence over this parameter.

history_file = file_name Name of the History File (for operation without a database)

Should the parameter history=yes be set and the scheduler not be using a database, then it will make an entry in this file for each task carried out. If no name is specified for the history file, then the Job Scheduler will use its own name. Note that the Job Scheduler will only write a history when the -log-dir option is set.

The factory.ini (section [job], entry history_file= …) setting has precedence over this parameter.

history_on_process = yes|no|number Write history entry after calling spooler_process()?

Should the Job Job Scheduler be writing a history, then the settings history_on_process=no or =0 cause it to make an entry in the history at the start of a task.

When history_on_process=yes or =1 then Job Scheduler only makes an entry after spooler_process() has been called. This means that no entry will be made, when spooler_open() returns false.

When a number is specified in this setting (history_on_process=x), the Job Scheduler makes an entry in the history only after the x-th execution of spooler_process() .

The factory.ini (section [job], entry history_on_process= 0) setting has precedence over this parameter.

Messages

[ERROR]

SCHEDULER-335

Only "yes", "no" and a number are allowed with ="": error 

history_with_log = yes|no|gzip Write a protocol in the history?

The Job Scheduler can add the task protocol to the history when the history is being recorded in a database, if required, compressed with gzip. (Here it is important to check that the protocol - which is saved in binary format - can be decompressed after being saved in the database.)

See the command: <show_task what="log"> .

The factory.ini (section [job], entry history_with_log= no) setting has precedence over this parameter.

html_dir = directory Directory for HTML files

The directory in which the HTML files for the Job Scheduler HTTP server are to be found.

Should no entry be made here, then the Job Scheduler uses the html directory in the configuration file directory.

id = scheduler_id Job Scheduler identifier (id)

The Job Scheduler only selects elements in the XML configuration whose spooler_id attributes are either empty or set to the value given here.

When the Job Scheduler ID is not specified here, then the Job Scheduler ignores the spooler_id= XML attribute and selects all the elements in the XML configuration.

See, for example, <config> .

The -id option has precedence over this parameter.

include_path = directory Directory path for <include>

The directory of the files which are to be included by the <include> element.

Environment variables (e.g. $HOME) are replaced by this attribute (see Settings which Allow Environment Variables to be Called).

The -include-path option has precedence over this parameter.

<config include_path="…"> is overwritten by this parameter.

log = file_name scheduler.log file name

This setting causes the Job Scheduler to write a detailed protocol. This protocol is intended for use in problem diagnosis. The file name should be fully specified here (i.e. as a full path).

A plus character (+) written directly before the file name causes an already existing protocol to be continued. Otherwise such a protocol will be overwritten.

Categories can be used to extend or restrict the log file. Category names are added (separated by spaces) before the file name, which is then preceded by a larger than (>) sign.

The list of categories can be found here.

Example:

log = c:/tmp/scheduler.log
log = scheduler.wait >scheduler.log
log = scheduler.wait com_server.* >scheduler.log
        

The -log option has precedence over this parameter.

log_dir = directory Protocol directory

The directory in which the Job Scheduler writes log files.

log_dir= *stderr allows the Job Scheduler to write log files to the standard output (stderr, normally the screen) .

The -log-dir option has precedence over this parameter.

log_level = log_level Limit protocol level

Defines the level with which protocol entries should be written. Every protocol entry is given one of the following categories: error, warn, info, debug1 to debug9 (debug1 is the same as debug).

The -log-level option has precedence over this parameter.

The factory.ini (section [job], entry log_level= info) setting has precedence over this parameter.

log_mail_bcc = email_address E-mail bcc recipient

The factory.ini (section [job], entry log_mail_bcc= …) setting has precedence over this parameter.

log_mail_cc = email_address E-mail cc recipient

The factory.ini (section [job], entry log_mail_cc= …) setting has precedence over this parameter.

log_mail_from = email_address E-mail sender

The factory.ini (section [job], entry log_mail_from= …) setting has precedence over this parameter.

log_mail_subject = text E-mail subject

The factory.ini (section [job], entry log_mail_subject= …) setting has precedence over this parameter.

log_mail_to = email_address E-mail recipient

The factory.ini (section [job], entry log_mail_to= …) setting has precedence over this parameter.

mail_encoding =

mail_on_delay_after_error = Suppress <delay_after_error>

Prerequisite: mail_on_error=yes or mail_on_warning=yes

This setting reduces the numerous e-mails after a job is restarted by way of <delay_after_error> .

This setting only works when <delay_after_error> has been set for as job. Should this not be the case, then mail_on_delay_after_error=all applies.

The factory.ini (section [job], entry mail_on_delay_after_error= first_and_last_only) setting has precedence over this parameter.

mail_on_error = yes|no Send an e-mail should a task end with an error

The factory.ini (section [job], entry mail_on_error= no) setting has precedence over this parameter.

mail_on_process = yes|no|number Send an e-mail at the start of a task using spooler_process()

Causes the task log to be sent when a task has completed at least the specified number of steps - i.e. calls of spooler_process() . Because non-API tasks do not have steps, the Job Scheduler counts each task as a single step.

yes corresponds to 1, no corresponds to 0.

The factory.ini (section [job], entry mail_on_process= 0) setting has precedence over this parameter.

mail_on_success = yes|no Send an e-mail on successful completion of a task

The factory.ini (section [job], entry mail_on_success= no) setting has precedence over this parameter.

mail_on_warning = yes|no An e-mail is sent after a task has ended, should a warning or an error occur

mail_queue_dir = directory Directory for e-mails which temporarily cannot be sent

E-mails which cannot be sent (because, for example, the SMTP server cannot be contacted) are stored in this directory.

In order to send these e-mails later it is necessary to write a job which calls up the Mail.dequeue() method.

This setting is generally made in sos.ini (section [mail], entry queue_dir= …).

Environment variables (e.g. $HOME) are replaced by this attribute (see Settings which Allow Environment Variables to be Called).

The factory.ini (section [job], entry mail_queue_dir= …) setting has precedence over this parameter.

The sos.ini (section [mail], entry queue_dir= …) setting is overwritten by this parameter.

mail_queue_only = yes|no Do not send e-mail, add it to the e-mail queue

When this parameter is set to yes, then e-mails are sot sent but added to the e-mail queue - see sos.ini (section [mail], entry queue_dir= …).

This setting is generally made in sos.ini (section [mail], entry queue_only= …).

The sos.ini (section [mail], entry queue_only= …) setting is overwritten by this parameter.

max_db_errors = number Number of database errors before the Job Scheduler shuts itself down

The Job Scheduler accepts this number of database errors. In the event of this number of errors being exceeded, and the option need_db=yes, then the scheduler shuts itself down immediately. Should need_db=no then the Job Scheduler will continue without the database.

In the case of need_db= yes, then the errors occurring when attempting to open a database will not be not counted. This means that the Job Scheduler can wait for a database which has not yet been opened.

need_db = yes|no|strict Is a database necessary?

need_db=no

Should the option db= not have been set, then the Job Scheduler issues a warning and operates without a database.

The Job Scheduler also issues a warning and operates without a database, should either the opening of a database or the automatic creation of the necessary tables not be successful.

In the event of a database error when the Job Scheduler is in operation, the Job Scheduler closes and reopens the database. Should the Job Scheduler be unsuccessful in either of these operations, then it will operate without the database.

In Cluster operation ( -exclusive or -distributed-orders ) the Job Scheduler rejects need_db=no with the following message:

SCHEDULER-358

This is a member of a cluster (option -exclusive or -distributed-orders), and therefore needs a database. need_db= is not allowed

need_db=yes

In this case, in the event of the db= setting not being specified, then the Job Scheduler will not start but return the following message, .

The Job Scheduler will not start should either the opening of the database or the automatic creation of tables not function successfully.

The Job Scheduler attempts to close and then reopen the database should a database error occur whilst it is in operation. Should the Job Scheduler not be successful in these operations, then it will reattempt to open the database at one minute intervals. It will continue with these attempts to reopen the database indefinitely. The Job Scheduler will not attempt to manage any tasks until it regains contact with the database.

The Job Scheduler sends an E-mail should repeated attempts to reopen the database be unsuccessful.

need_db=strict

As need_db=yes with the following exceptions:

Should a database error occur whilst the Job Scheduler is in operation, then it attempts to close and then reopen the database. Should an error repeat itself then the Job Scheduler will repeat this process for the number of times specified in the max_db_errors= setting. Should the scheduler not be successful reopening the database, then it will shut itself down.

order_history = yes_no Write orders in the history?

A separate history is recorded for orders.

order_history_with_log = yes|no|gzip Record the order log in the history?

The Job Scheduler can record the order log in the database - compressed with gzip if required. (Here it is important to check that the log - which is saved in binary format - can be decompressed after being saved in the database.)

See the command: <show_order what="log"> .

param = text For free use

Free text. This parameter can be read using spooler.param.

The -param option has precedence over this parameter.

smtp = host_address E-mail SMPT server hostname or IP number

These settings are generally made using sos.ini (section [mail], entry smtp= …).

smtp=-queue stops e-mails being sent. Instead mails are written into the file specified in queue_dir. See also sos.ini (section [mail], entry queue_only= …).

The factory.ini (section [job], entry smtp= …) setting has precedence over this parameter.

The sos.ini (section [mail], entry smtp= …) setting is overwritten by this parameter.

subprocess.own_process_group = yes|no Start a Sub-Process in its own Group

This is the default setting for Subprocess.own_process_group

tmp = path Directory for Temporary Files

The default setting is the TMP environment variable.

On Unix systems /tmp/ is used, should the TMP environment variable not have been set.