The JAMS Cross-Platform Client provides access to the JAMS Scheduler using multiple platforms. It allows users to execute JAMS commands via scripting and the command line by leveraging the JAMS REST API.
In order to work with the JAMS Cross-Platform Client you will need to meet the two requirements below:
To get started, install the JavaScript runtime node.js at http://nodejs.org and download the latest version of 4.2.x or 5.5.x. The current version has been tested against versions 4.2.6 and 5.5.0.
npm install jams -g
![]() |
Note: Excluding the global parameter (-g) will install the client in the following location: <current directory>\node_modules\jams |
![]() |
Note: the client should be installed globally if it is to be executed from the command line. Otherwise, commands will be executed from within the node_modules/jams directory of the installed location. |
If installing locally on a Unix-based system, client commands must be invoked by ".]jams.js" instead of "jams" (see the example below). This is not necessary if the client is installed globally.
Global installation Example |
Copy Code
|
---|---|
jams login -u user123 -p password123 |
Local Installation Example |
Copy Code
|
---|---|
./jams.js login -u user123 -p password123 |
jams set admin -n server -s (url of JAMS REST API)
![]() |
Note: If utilizing a non-standard HTTP/HTTPS port please ensure the URL is updated as such.
|
Set Active JAMS REST API Example |
Copy Code
|
---|---|
jams set admin -n server -s http://myserver.1235/JAMS/api |
Note: the admin server setting can be overwritten with a -r parameter at command execution
![]() |
Note: the client can only be authenticated with one server at a time. Changing servers requires a login prior to any command execution. |
Setting the active JAMS REST API Example |
Copy Code
|
---|---|
jams login -u user123 -p password123 -r http://myserver.1235/jams/api jams submit-u user123 -n /Tests/123 -r http://myserver.1235/jams/api |
![]() |
Note: The client can only be authenticated with one server at a time. Changing servers requires a login prior to any command execution. |
All the commands listed below are accessible from a terminal window or a command prompt.
jams [optional action] [command] [parameters]
-h,--help Output usage information
-V,--version Output the version number
-v,--verbose Display Verbose information
-r,--server Override default JAMS server with defined location
Help Displays contextual help for client commands.
jams -h <command>
Displays main help menu |
Copy Code
|
---|---|
jams –h |
Displays help for submit command |
Copy Code
|
---|---|
jams –h submit |
Connect to the JAMS Scheduler
jams login -u <username> -p <password>
Login Command Example |
Copy Code
|
---|---|
jams login -u testuser -p password123 |
Disconnect from the JAMS Scheduler
jams logout
Submit a job to the JAMS Scheduler
jams submit -n <job name> [-d <date>] [-t <time>] [-q <batch queue>] [-a <agent node>] [-p <priority>] [-o]
JAMS Submit Command Examples |
Copy Code
|
---|---|
jams submit -n \Samples\Test123 jams submit -n \Samples\Test123 -s 12/11/2016 -t "03:50:00 PM" -q "queueABC" -a "node123" -p 1 -o |
Display or manage JAMS Job entries
jams get|hold|release entry [-i <entry id>] [-a <audit comment>]
JAMS Entry Command Examples |
Copy Code
|
---|---|
jams get entry -i 12345 jams hold entry -i 12345 -a "Sample Comment" jams release entry -i 12345 -a "Sample Comment" |
Display or manage JAMS entry parameters
jams get|set parameter* [-i <entry id>] [-n <parameter name>] [-s <*parameter value>]
JAMS Parameter Command Examples |
Copy Code
|
---|---|
jams get parameter -i 12345 jams get parameter -i 12345 -n JAMSTraceLevel jams set parameter -i 12345 -n JAMSTraceLevel -s "On" |
Display or manage JAMS Variables
Usagejams get|set variable [-n <name>] [-s <value>]
JAMS Variable Command Examples |
Copy Code
|
---|---|
jams get variable jams get variable -n testvalue jams get variable -n testvalue -s testABC |
View or modify JAMS Client settings
jams get|set admin [-n <name>] [-s <value>]
JAMS Admin Command Examples |
Copy Code
|
---|---|
jams get admin jams get admin -n server jams set admin -n server -s http://localhost:62405/api |
A user must login prior to executing all commands save admin functions.
jams login -u <username> -p <password>
Submitting a Job (Unix/Linux) Example |
Copy Code
|
---|---|
jams submit -n //Test//Job123
|
Submitting a Job (Windows) Example |
Copy Code
|
---|---|
jams submit -n /Test/Job123 |