Command Line Options

CopyStorm/JobRunner supports the following command line options:

Option Argument(s) Description
-action string The operation CopyStorm/JobRunner should perform. Supported actions include:

  • runScheduled — run available pending jobs.
  • status — display a brief summary of all jobs.
  • makeCredentials — create an encryption token usable with the -cscredentials option.
  • runCopyStorm — used in conjunction with the -jobs flag to force specific CopyStorm jobs to run.
  • runCopyStormMedic — used in conjunction with the -jobs flag to force specific CopyStorm/Medic jobs to run.
-maxJobs integer Limits the number of concurrent CopyStorm and CopyStorm/Medic jobs. The value is global and enforced across all active copies of the CopyStorm/JobRunner.
-jobs string A comma-separated list of unique job ids. Job range expressions are also supported. For example:

  • 1,3,4
  • 1-10,11,12,15-20
-family string Limits the family of tasks that will run when the -runCopyStorm or -runCopyStormMedic option is used. The default value for this parameter is “Default”.
-cscredentials string An encrypted string containing all the information required to connect to a CopyStorm/Director database.
-cstype string The database type of the CopyStorm/Director database. Supported values include:

  • sqlserver
  • oracle
  • mysql
  • postgresql
  • h2
-csdatabase string The JDBC connection string used to connect to the CopyStorm/Director database.
-csuser string The username used to authenticate with the CopyStorm/Director database.
-cspassword string The password used to authenticate with the CopyStorm/Director database.
-apachelog If this flag is present, the org.apache.commons.logging system will be used. Otherwise a default logging system that writes to stderr will be used.
-silent If this flag is present, the application will not generate any messages unless an error is encountered.

The following sample command lines illustrate how the various options are used.

Run All Scheduled Jobs

sh -action runScheduled -cscredentials “xyzzy”

Run All Scheduled Jobs With Clear Text Credentials

Note: It is bad practice to use clear text credentials on the command line.

CopyStormJobRunner.bat -action runScheduled -cstype postgresql -csdatabase //localhost/copystormjob -csuser root -cspassword mypassword

Run All Scheduled Jobs but No More Than 10 Simultaneously

sh -action runScheduled -maxJobs 10 -cscredentials “encrypted-credentials-string”

Generate an Encrypted Token That Can be Used for the -cscredentials Option

sh -action makeCredentials -cstype postgresql -csdatabase //localhost/copystormjob -csuser root -cspassword mypassword

Force the Default CopyStorm Task for Jobs 1 and 5 to Run

sh -action runCopyStorm -jobs 1,5 -cscredentials “encrypted-credentials-string”

Tell Me How Many Jobs are Running (and other status information)

sh -action status -cscredentials “encrypted-credentials-string”