public bool InsertBackgroundJob(QuartzModel model) { //添加job,添加job状态 var IsSuccess = false; IsSuccess = QuartzHelper.AddJob(model).GetAwaiter().GetResult(); //var StateModel = new JobState() //{ // SCHED_NAME=model.SchedName, // JOB_NAME=model.JobName, // JOB_GROUP=model.JobGroup, // JOB_STATE=0 //}; //db.Insertable(StateModel).ExecuteCommand(); return(IsSuccess); }