Job management tools
The usage of all the available gb2 tools is shown.
In most cases, examples of how to use them can be obtained with the flag --usage
.
gb2_job_status
Show status of all or selected jobs in a project. Detailed information is obtained by “-l” option.
Examples::
$ gb2_job_status -j 7286133,7286135
$ gb2_job_status -j 7286150 -l
$ gb2_job_status -p myProject
$ gb2_job_status -p 00000088 --status="Failed"
usage: gb2_job_status [-h] [-v] [--usage] [--date [YYYY-MM-DD]] (-j [JOBID ...] | -p [PROJECT ...]) [-g GROUP] [-u USER] [-l] [--status STATUS] [--minorstatus MINORSTATUS]
[--appstatus APPSTATUS] [--site SITE]
Named Arguments
- -v, --verbose
increase verbosity (up to -vv)
Default:
0
- --usage
show detailed usage
- --date
time format or strings (today, 1{(d(ay)|w(eek)|m(onth)|y(ear)}). Default: 1day
- -j, --jobid
specify job ID(s)
- -p, --project
specify project name(s)
- -g, --group
specify group
- -u, --user
specify user name
- -l, --long
long listing (-ll: extra long)
- --status
Checking, Completed, Deleted, Done, Failed, Killed, Matched, Running, Staging, Stalled, Scheduled, Waiting
- --minorstatus
Application, Application Finished Successfully, Application Finished With Errors, Application not found, Assigned, Bulk transaction confirmation, Exception During Execution, Execution Complete, etc.
- --appstatus
project application status
- --site
specify target site
gb2_job_parameters
Show job parameters
–Ncycle enables to access past job which was rescheduled. Note that –Ncycle=0 points the first “rescheduled” job.
Examples:
$ gb2_job_parameters -p myProject
$ gb2_job_parameters -j 7123123 --Ncycle 0
$ gb2_job_parameters -p projectX -u nmolina --minorstatus 'Application Finished With Errors'
usage: gb2_job_parameters [-h] [-v] [--usage] [--Ncycle NCYCLE] [--date [YYYY-MM-DD]] (-j [JOBID ...] | -p [PROJECT ...]) [-g GROUP] [-u USER] [--status STATUS]
[--minorstatus MINORSTATUS] [--appstatus APPSTATUS] [--site SITE]
Named Arguments
- -v, --verbose
increase verbosity (up to -vv)
Default:
0
- --usage
show detailed usage
- --Ncycle
Specify rescheduled cycle (0-)
- --date
time format or strings (today, 1{(d(ay)|w(eek)|m(onth)|y(ear)}). Default: 1day
- -j, --jobid
specify job ID(s)
- -p, --project
specify project name(s)
- -g, --group
specify group
- -u, --user
specify user name
- --status
Checking, Completed, Deleted, Done, Failed, Killed, Matched, Running, Staging, Stalled, Scheduled, Waiting
- --minorstatus
Application, Application Finished Successfully, Application Finished With Errors, Application not found, Assigned, Bulk transaction confirmation, Exception During Execution, Execution Complete, etc.
- --appstatus
project application status
- --site
specify target site
gb2_job_output
Download the output sandbox of a given job or project.
Examples:
$ gb2_job_output -j 123456
$ gb2_job_output -p myProject
usage: gb2_job_output [-h] [-v] [--usage] [--date [YYYY-MM-DD]] (-j [JOBID ...] | -p [PROJECT ...]) [-g GROUP] [-u USER] [--status STATUS] [--minorstatus MINORSTATUS]
[--appstatus APPSTATUS] [--site SITE]
Named Arguments
- -v, --verbose
increase verbosity (up to -vv)
Default:
0
- --usage
show detailed usage
- --date
time format or strings (today, 1{(d(ay)|w(eek)|m(onth)|y(ear)}). Default: 1day
- -j, --jobid
specify job ID(s)
- -p, --project
specify project name(s)
- -g, --group
specify group
- -u, --user
specify user name
- --status
Checking, Completed, Deleted, Done, Failed, Killed, Matched, Running, Staging, Stalled, Scheduled, Waiting
- --minorstatus
Application, Application Finished Successfully, Application Finished With Errors, Application not found, Assigned, Bulk transaction confirmation, Exception During Execution, Execution Complete, etc.
- --appstatus
project application status
- --site
specify target site
gb2_job_reschedule
Resubmit failed jobs or projects. Only jobs which have fatal status (Failed, Killed, Stalled) are affected.
Exact same sandbox and parameters are reused. Thus you may need to submit a new project if there is an issue with the input parameters.
Examples:
% gb2_job_reschedule -j 723428,723429
% gb2_job_reschedule -p myProject
usage: gb2_job_reschedule [-h] [-v] [--usage] [--date [YYYY-MM-DD]] [--download] (-j [JOBID ...] | -p [PROJECT ...]) [-g GROUP] [-u USER] [-f] [--doAll]
Named Arguments
- -v, --verbose
increase verbosity (up to -vv)
Default:
0
- --usage
show detailed usage
- --date
time format or strings (today, 1{(d(ay)|w(eek)|m(onth)|y(ear)}). Default: 1day
- --download
Keep log files of the job to be rescheduled
Default:
False
- -j, --jobid
specify job ID(s)
- -p, --project
specify project name(s)
- -g, --group
specify group
- -u, --user
specify user name
- -f, --force
skip confirmation
Default:
False
- --doAll
ignore masked status
Default:
False
gb2_job_kill
Kill individual jobs or all jobs in a project. Note: Killed jobs can be restarted by gb2_job_reschedule, or removed from job DB after a few weeks.
Examples:
$ gb2_job_kill -j 12384
$ gb2_job_kill -p myProject
$ gb2_job_kill -p myProject, mySecondProject
usage: gb2_job_kill [-h] [-v] [--usage] [--date [YYYY-MM-DD]] (-j [JOBID ...] | -p [PROJECT ...]) [-g GROUP] [-u USER] [-f]
Named Arguments
- -v, --verbose
increase verbosity (up to -vv)
Default:
0
- --usage
show detailed usage
- --date
time format or strings (today, 1{(d(ay)|w(eek)|m(onth)|y(ear)}). Default: 1day
- -j, --jobid
specify job ID(s)
- -p, --project
specify project name(s)
- -g, --group
specify group
- -u, --user
specify user name
- -f, --force
skip confirmation
Default:
False
gb2_job_delete
Delete jobs or projects. Each job is killed then soon deleted from job DB.
Examples:
$ gb2_job_delete -j 12384
$ gb2_job_delete -p myProject
$ gb2_job_delete -p myFirstProject, mySecondProject
usage: gb2_job_delete [-h] [-v] [--usage] [--date [YYYY-MM-DD]] (-j [JOBID ...] | -p [PROJECT ...]) [-g GROUP] [-u USER] [-f]
Named Arguments
- -v, --verbose
increase verbosity (up to -vv)
Default:
0
- --usage
show detailed usage
- --date
time format or strings (today, 1{(d(ay)|w(eek)|m(onth)|y(ear)}). Default: 1day
- -j, --jobid
specify job ID(s)
- -p, --project
specify project name(s)
- -g, --group
specify group
- -u, --user
specify user name
- -f, --force
skip confirmation
Default:
False