getJobStatus

Syntax

getJobStatus(jobId)

Arguments

jobId is the batch job ID.

Details

Retrieve the status of a batch job.

It returns a table with the following columns:

Name

Meaning

node

the alias of the local node

userID

the user ID

jobId

the job ID

rootJobId

the root job ID

jobDesc

the job description

priority

priority of the job which is marked as integers ranging from 0 to 9

parallelism

the parallelism, i.e., the maximum number of jobs that can run in parallel

clientIp

the IP address of the client where the job is submitted

clientPort

the port number of the client where the job is submitted

receivedTime

the time (of TIMESTAMP type) when a job is received by the node

startTime

the start time of jobs (of TIMESTAMP type)

endTime

the end time of jobs (of TIMESTAMP type)

errorMessage

error messages

For details about batch jobs please refer to Batch Job Management.

Examples

$ def job1(n){
$    s = 0
$    for (x in 1 : n) {
$        s += sum(sin rand(1.0, 100000000)-0.5)
$        print("iteration " + x + " " + s)
$
$    }
$    return s
$ }
$
$ job1_ID=submitJob("job1_ID","", job1, 100);
$ getJobStatus(job1_ID);

node

userID

jobId

jobDesc

priority

parallelism

receivedTime

startTime

EndTime

ErrorMsg

controller2

guest

job1_ID20210428…

job1

0

1

2021.04.28T05:55:03.279

2021.04.28T05:55:03.281

endTime is empty. This means the job is still running. After the job is completed, rerun getJobStatus:

$ getJobStatus("jobDemo1");

Node

UserID

JobID

JobDesc

ReceivedTime

StartTime

EndTime

ErrorMsg

local8848

root

jobDemo1

job demo

2017.11.15T18:30:33.796

2017.11.15T18:30:33.797

2017.11.15T18:32:07.716