getJobMessage

Syntax

getJobMessage(jobId)

Arguments

jobId is a string indicating the batch job ID.

Details

Retrieve the intermediate messages from a batch job. 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
}
// output
job1_ID=submitJob("job1_ID","", job1, 100);

Run the following command after the job is completed.

getJobMessage(job1_ID);

// output
2021-04-27 11:29:59.488488 Start the job [job1_ID]: job1
2021-04-27 11:30:01.379568 iteration 1 1850.532362292674861
2021-04-27 11:30:02.905145 iteration 2 3481.051082793509067
2021-04-27 11:30:04.506399 iteration 3 6338.637607451696567
2021-04-27 11:30:05.918307 iteration 4 6683.476434419478209
2021-04-27 11:30:07.375599 iteration 5 2530.259402850952938
2021-04-27 11:30:08.786317 iteration 6 3703.629418401157636
2021-04-27 11:30:10.194354 iteration 7 2813.420082343553985
2021-04-27 11:30:11.598985 iteration 8 4933.850209294281739
2021-04-27 11:30:13.002326 iteration 9 5154.255793881513454
2021-04-27 11:30:14.412271 iteration 10 -3309.722440538816954
2021-04-27 11:30:15.823373 iteration 11 -1659.488479800297909
2021-04-27 11:30:17.242967 iteration 12 -3625.982445703876692
2021-04-27 11:30:18.825975 iteration 13 -631.335252897485588
2021-04-27 11:30:20.484410 iteration 14 1624.923506700145026
2021-04-27 11:30:21.908811 iteration 15 59.809027080983469
2021-04-27 11:30:23.423718 iteration 16 -1876.258259260708655
2021-04-27 11:30:24.894356 iteration 17 -1311.358522160356187
2021-04-27 11:30:26.314293 iteration 18 393.578971401109583
2021-04-27 11:30:27.777455 iteration 19 -138.581585426370565
2021-04-27 11:30:29.247481 iteration 20 4898.050366365572699