There are several Batch Manager runtime options you can use when starting the Batch Manager client from the command line. Any settings passed to the application using these options are valid only for the duration of the current Batch Manager session. Once the Batch Manager is stopped, the settings will revert to the defaults—unless new options are passed.
Connection arguments enable you to pass the database connection, username, and password information to the Batch Manager at runtime. The following list describes the connection arguments which are available for use:
This argument enables you to pass the server, database name, and port. xTuple ERP runs on the PostgreSQL database, so the form of this argument is:
psql://server/databasename:port
For example, if you run PostgreSQL on a server whose IP address is 192.168.1.150
and the name of your database is xtuple_db
and PostgreSQL is listening on port 5432
, the argument would look like this:
-databaseURL=psql://192.168.1.151/xtuple_db:5432
This optional argument enables you to pass the username that the Batch Manager will log in as. A common practice is to create a user through the xTuple client that has all application privileges—and is also a super user on the PostgreSQL database. (The super user requirement is needed to permit the user to perform database reindexing, which is handled by the Schedule Server Maintenance job). While you want the Batch Manager admin user to have all xTuple ERP privileges, you should consider withholding access to all xTuple ERP menus for this user. (To do this, simply de-select all the menu options on the User Preferences screen.) The reason for this approach is to ensure that if a user logs into xTuple with the Batch Manager user, no menu options will be available to them. To pass the username argument on the command line for a Batch Manager admin user defined as "batch", the argument would look like this:
-username=batch
This optional argument enables you to pass the Batch Manager admin user's password to the Batch Manager client at log in. This is necessary if you plan to auto start the Batch Manager when the computer the Batch Manager is running on reboots. (For more information, see Section 4, “Automatic Startup Techniques”.) If you do not pass this argument, the password must be entered manually. For example, if the Batch Manager admin's password is "!xbatch1", then the argument would look like this:
=passwd=!xbatch1
In this section we describe several options available to you if you want or need to modify the default Batch Manager timing options. The default Batch Manager settings may not be ideal for every installation—or for every use case you may have at your site. The following interval arguments can be used to fine-tune specific timing intervals:
The refresh interval argument defines in seconds how often the Batch Manager attempts to reestablish a connection with the xTuple server. This is useful if the network connection is temperamental. The default is 86400 which is 1 hour. Here is an example where the interval is ten minutes:
-refresh 600
The idle interval argument defines in seconds how long the Batch Manager waits when there are no jobs presently scheduled before looking for a new job to process. The default is 300 (5 minutes). The following shows an example where the Batch Manager will remain idle for 30 seconds when no jobs are presently scheduled before checking to see if there is a new job to run:
-idle 30
The number of seconds the Batch Manager should wait to look for new jobs after finishing a job (default is 30 seconds). The following are examples you might use:
batchmanager -refresh 81000
or
batchmanager -idle 200
batchmanager -refresh 81000 -idle 200
or
batchmanager -rest 10
batchmanager -refresh 81000 -idle 200 -rest 10
All of the above interval arguments may be issued individually or combined in a single command line statement or startup script. Here is an example combination you might use for the Batch Manager executable on the Windows platform:
BatchManager.exe -databaseURL=psql://192.168.1.151/xtuple_db:5432 -refresh 600 -idle 30 -rest 15
In this example, the PostgreSQL server is 192.168.1.151
, the name of the database is xtuple_db
, and PostgreSQL is listening on port 5432
. The refresh interval is 600 seconds, with an idle interval of 30 seconds, and a rest interval of 15 seconds.