Job Group Management Command: jobgroup
Query: ls
Entry:
lbg jobgroup ls
Summary:
usage: lbg jobgroup ls [-h] [-q] [-s START] [-e END] [-k SEARCH] [-o SORTBY] [-as] [--csv]
[--json] [--yaml] [--table] [--noheader] [-n NUMBER]
options:
-h, --help show this help message and exit
-q, --quiet only show job group id
-s START, --start START
default is a day ago. format is yyyy-mm-dd
-e END, --end END default is a day today. format is yyyy-mm-dd
-k SEARCH, --search SEARCH
allow search id/name
-o SORTBY, --sortby SORTBY
sort by id/createTime default is id
-as, --asce list by ascending, default descending
--csv output with csv format
--json output with json format
--yaml output with yaml format
--table output with table format
--noheader does not print header information
-n NUMBER, --number NUMBER
number of result to be display, default 50
Parameter Description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--start | -s | Start time, format is yyyy-mm-dd | No |
--end | -e | End time, format is yyyy-mm-dd | No |
--search | -k | Search by id/name | No |
--sortby | -o | Sort by createTime/id, default is id | No |
--asce | -as | Sort in reverse order | No |
--number | -n | Number of job groups to display, default is 50 | No |
Example:
$ lbg jobgroup ls -n 10 # Display the first 10 job groups
$ lbg jobgroup ls -s 2022-03-05 -e 2022-07-08 # Display job groups from March 5, 2022, to July 8, 2022
Terminate: terminate
Entry:
lbg jobgroup terminate
Summary:
usage: lbg jobgroup terminate [-h] [-f] jobgroup_id [jobgroup_id ...]
positional arguments:
jobgroup_id id of the job group
options:
-h, --help show this help message and exit
-f, --force force terminate job group
Parameter Description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--force | -f | No prompt | No |
--job_ids | - | Job group id to be terminated early | No |
Example:
$ lbg jobgroup terminate 123 654 # Terminate job groups with ID 123 and 654 early
Delete: rm
Entry:
lbg jobgroup rm
Summary:
usage: lbg jobgroup rm [-h] [-f] jobgroup_id [jobgroup_id ...]
positional arguments:
jobgroup_id id of the job group
options:
-h, --help show this help message and exit
-f, --force force delete job group
Parameter Description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--force | -f | No prompt | No |
--job_ids | - | Job group id to be deleted | No |
Example:
$ lbg jobgroup rm 123 654 # Delete job groups with ID 123 and 654
Download: download
Entry:
lbg jobgroup download
Summary:
usage: lbg jobgroup download [-h] [-p PATH] [-pr] jobgroup_id [jobgroup_id ...]
positional arguments:
jobgroup_id id of the job group
options:
-h, --help show this help message and exit
-p PATH, --path PATH download location default current dir
-pr, --parent create parent dir if needed
Parameter Description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--parent | -pr | Create parent directory if it does not exist | No |
--path | -p | Download to the specified directory, default is the current directory | No |
Example:
$ lbg jobgroup download 123 654 # Download job groups with ID 123 and 654
Create: create
Entry:
lbg jobgroup create
Summary:
usage: lbg jobgroup create [-h] [-n NAME] [-pjid PROJECT_ID]
optional arguments:
-h, --help show this help message and exit
-n NAME, --name NAME name of the job group
-pjid PROJECT_ID, --project_id PROJECT_ID project id of the job group
Parameter Description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--name | -n | the name of job group | Yes |
--project_id | -pjid | the project id of job group | Yes |
Example:
$ lbg jobgroup create -n test -pjid 123 # Create a job group named test with project ID 123
{'groupId': 345} #GroupId is the created job group ID
Note on Using Job Group ID:
Attention
The groupId
referenced here differs from the JOB GROUP ID
that you receive upon creating a job. When submitting a job, the group id that is acquired through the lbg jobgroup create
command should be specified as bohrJobGroupId
within the job configuration JSON file, instead of jobGroupId
.