> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/copystorm-director/reference/copystorm-jobrunner/command-line-options.md).

# Command Line Options

CopyStorm/JobRunner supports the following command line options:

| Option         | Argument(s) | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -action        | string      | <p>The operation CopyStorm/JobRunner should perform. Supported actions include:</p><ul><li>runScheduled — run available pending jobs.</li><li>status — display a brief summary of all jobs.</li><li>makeCredentials — create an encryption token usable with the -cscredentials option.</li><li>runCopyStorm — used in conjunction with the -jobs flag to force specific CopyStorm jobs to run.</li><li>runCopyStormMedic — used in conjunction with the -jobs flag to force specific CopyStorm/Medic jobs to run.</li></ul> |
| -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      | <p>A comma-separated list of unique job ids. Job range expressions are also supported. For example:</p><ul><li>1,3,4</li><li>1-10,11,12,15-20</li></ul>                                                                                                                                                                                                                                                                                                                                                                      |
| -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      | <p>The database type of the CopyStorm/Director database. Supported values include:</p><ul><li>sqlserver</li><li>oracle</li><li>mysql</li><li>postgresql</li><li>h2</li></ul>                                                                                                                                                                                                                                                                                                                                                 |
| -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 CopyStormJobRunner.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 CopyStormJobRunner.sh -action runScheduled -maxJobs 10 -cscredentials “encrypted-credentials-string”

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

sh CopyStormJobRunner.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 CopyStormJobRunner.sh -action runCopyStorm -jobs 1,5 -cscredentials “encrypted-credentials-string”

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

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