new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
.format(new Date()) + " 开始运行");
context.getJobHistoryManager().updateJobHistoryLog(his.getId(),
his.getLog().getContent());
Exception exception = null;
Response resp = null;
try {
Future<Response> f = new MasterExecuteJob().executeJob(
context, w, ExecuteKind.ScheduleKind, his.getId());
resp = f.get();
} catch (Exception e) {
exception = e;
ScheduleInfoLog.error(
String.format("JobId:%s run failed", jobId), e);
}
boolean success = resp.getStatus() == Status.OK ? true : false;
JobStatus jobstatus = context.getGroupManager().getJobStatus(
jobId);
jobstatus
.setStatus(com.taobao.zeus.model.JobStatus.Status.WAIT);