getJobMessage

Parent Previous Next


语法


getJobMessage(job_id)


参数


job_id是批处理作业的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);

2018-06-16 10:44:34.066064 Start the job [job1_ID]: job1

2018-06-16 10:44:35.377095 iteration 1 1412.431451

2018-06-16 10:44:36.624907 iteration 2 2328.917258

2018-06-16 10:44:37.577107 iteration 3 5491.651822

2018-06-16 10:44:38.530187 iteration 4 6332.907608

2018-06-16 10:44:39.488295 iteration 5 8404.393113

......

2018-06-16 10:46:06.655519 iteration 95 -13124.624482

2018-06-16 10:46:07.562855 iteration 96 -14878.269863

2018-06-16 10:46:08.520555 iteration 97 -9842.451424

2018-06-16 10:46:09.456576 iteration 98 -8149.660675

2018-06-16 10:46:10.373218 iteration 99 -10639.329897

2018-06-16 10:46:10.389147 The job is done.