public static string GetJobExecuteTime(string id) { using (DBContainer db = new DBContainer()) { //定义trigger名称 string triggerName = "Trigger_" + id; ObjectResult <P_QRTZ_GetJobExecuteTime_Result> result = db.P_QRTZ_GetJobExecuteTime(triggerName); if (result == null) { return(""); } var tigResult = result.SingleOrDefault(); if (tigResult == null) { return(""); } long starttime = tigResult.START_TIME; TimeSpan t = new TimeSpan(0); DateTimeOffset df = new DateTimeOffset(starttime, t); return(df.DateTime.ToLocalTime().ToString()); } }