Running the accumulated batch job

You can run the batch job from the command line or scheduler by running one of these scripts.

You will find all scripts in the bin folder beneath the Batch bundle installation directory.

run
Function Runs a batch process. Note that this is a general script that accepts a single command and several arguments.
Command Line Interface
Script prompt> run [commands] [options]]
Examples:
prompt> run -domain EngageOneDevDomain -verbose 
prompt> run -domain EngageOneDevDomain -channel print archive
prompt> run restart -domain EngageOneDevDomain -batch 101 
prompt> run resume -domain EngageOneDevDomain -batch 101
Commands
resume Resumes a batch process.
restart Restarts a batch process.
Options
-help Prints the syntax and usage information for this batch job.
-batch Resumes/restarts the batch ID provided as an argument.
-channel The name of the channel to run provided as an argument. Must be either a print, archive, or EngageOne Deliver delivery channel.
Note: Multiple channel assignment can be made as required.
-domain The name of the community for the batch process provided as an argument. (Required)
-logdocevents Places a message in event monitor for each successful document. The default setting is not to log these messages.
-maxLogFileCount Sets the maximum log file number of log files to keep using the argument provided. The default is 10. (Optional)
-maxLogFileSize Sets the maximum log file size of each log file with the argument provided. The default is 10(MB). If you reach the maximum log file size, the server rolls over to a new file and deletes the oldest log file if the maximum log file count has been reached. Using the default settings, that equals a maximum of 10 log files with a maximum of 10MB each. (Optional)
-quiet Suppresses writing log output to the console. Can be used in combination with -verbose. (Optional)
-verbose Writes detailed information to the log. This is the default setting. A batch runs in DEBUG mode when this option is used. If -verbose is not present, A batch runs in INFO mode. Can be used in combination with -quiet. (Optional)
-recover Used by the ONH files recovery mechanism described on ONH file recovery mechanism (Optional)
run-channel
Function Batch run for channels.

The syntax for run-channel is different than run. You do not specify the domain and channel as -community {community_name} -channel {channel_name}. See the example for the correct syntax.

Command Line Interface
Script prompt> run-channel {domain} {channel}
Examples:
prompt> run-channel EngageOneDevDomain Print_Channel
prompt> run-channel EngageOneDevDomain Print_Channel Archive_Channel
Options
{domain} The community name to use to start the batch.
{channel} The name of the channel(s) to run.
-logdocevents Places a message in event monitor for each successful document. The default setting is not to log these messages.
-maxLogFileCount Sets the maximum log file number of log files to keep using the argument provided. The default is 10. (Optional)
-maxLogFileSize Sets the maximum log file size of each log file with the argument provided. The default is 10(MB). If you reach the maximum log file size, the server rolls over to a new file and deletes the oldest log file if the maximum log file count has been reached. Using the default settings, that equals a maximum of 10 log files with a maximum of 10MB each. (Optional)
restart-batch
Function Restarts a batch job for the given batch ID. restart-batch resets the status to Composed for all records with the matching batch ID and then restarts the job.

Use restart-batch when you want to run a job again that initially contained errors or stopped unexpectedly and you want the output to contain all records in the job. A batch job can also be restarted by using the proper argument in the run function. See run for more information.

restart-batch retains the original value of output variable. If an output variable that was used during the batch run has been modified, restarting the batch still takes the original value of the variable as it was when the batch was run and the batch ID was assigned. This behavior does not apply to system variables such as system date, system time, etc.

The syntax for restart-batch is different than run. You do not specify the domain and batch ID as -community {community_name} -batch {batch ID}. See the example for the correct syntax.

Command Line Interface
Script prompt> restart-batch {domain} {batch ID}
Example prompt> restart-batch EngageOneDevDomain 101
Options
{domain} The community name to use to restart the batch.
{batch} Restarts the specified batch ID.
-logdocevents Places a message in event monitor for each successful document. The default setting is not to log these messages.
-maxLogFileCount Sets the maximum log file number of log files to keep using the argument provided. The default is 10. (Optional)
-maxLogFileSize Sets the maximum log file size of each log file with the argument provided. The default is 10(MB). If you reach the maximum log file size, the server rolls over to a new file and deletes the oldest log file if the maximum log file count has been reached. Using the default settings, that equals a maximum of 10 log files with a maximum of 10MB each. (Optional)
resume-batch
Function Resumes a batch job for the given batch ID. resume-batch resets the status to Composed for all records with the matching batch ID and that were marked as errored the last time the job was run. It also processes any records that were not processed during the original run due to the job being stopped because of a system failure or an error threshold being reached.

Use resume-batch when you want to run a job again that stopped because of system failure or errors, but you only want the output to contain records in the job that initially failed or had not yet been processed when the job stopped. A batch job can also be resumed by using the proper argument in the run function. See run for more information.

The syntax for resume-batch is different than run. You do not specify the community and batch ID as -community {domain_name} -batch {batch ID}. See the example for the correct syntax.

Command Line Interface
Script prompt> resume-batch {domain} {batch ID}
Example prompt> resume-batch EngageOneDevDomain 101
Options
{domain} Community name used to resume the batch.
{batch} Resumes the specified batch ID.
-logdocevents Places a message in event monitor for each successful document. The default setting is not to log these messages.
-maxLogFileCount Sets the maximum log file number of log files to keep using the argument provided. The default is 10. (Optional)
-maxLogFileSize Sets the maximum log file size of each log file with the argument provided. The default is 10(MB). If you reach the maximum log file size, the server rolls over to a new file and deletes the oldest log file if the maximum log file count has been reached. Using the default settings, that equals a maximum of 10 log files with a maximum of 10MB each. (Optional)