getJobMessage

语法

getJobMessage(jobId)

参数

jobId 是批处理作业的 ID,是一个字符串。

例子

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);

批处理作业完成后,执行以下命令:

getJobMessage(job1_ID);

返回:

2024-02-29 10:56:55.125615 Start the job [job1_ID20240229]: job1
2024-02-29 10:56:55.938532 iteration 1 2542.744146434795766
2024-02-29 10:56:56.683705 iteration 2 2834.406141847552134
2024-02-29 10:56:57.421935 iteration 3 2420.08773301971405
2024-02-29 10:56:58.176558 iteration 4 5787.891641851039821
2024-02-29 10:56:58.914166 iteration 5 7869.653776258541256
2024-02-29 10:56:59.658379 iteration 6 6584.060216762638447
2024-02-29 10:57:00.406996 iteration 7 4886.262633130692847
2024-02-29 10:57:01.144179 iteration 8 3143.701651700350794
2024-02-29 10:57:01.873800 iteration 9 387.615360897112623
2024-02-29 10:57:02.642908 iteration 10 -821.601298788548092
2024-02-29 10:57:03.393065 iteration 11 1857.255073417691846
2024-02-29 10:57:04.136316 iteration 12 -2146.698576091761424