using Quartz; using System; using WX.CRM.BLL.Util; using WX.CRM.Common; namespace WX.CRM.CRMServices.Res_AlloCate { /// /// 资源分配调度 /// public class ResAllocateJob : IJob { static bool isSucess = false; #region IJob Members public void Execute(JobExecutionContext context) { if (isSucess) return; try { CACHE_BL _cache = new CACHE_BL(); //Gjs_WorkTradeCalender workDate = _cache.GetModel_WorkTradeCalender(); ////节假日不进行资源分配 //if (workDate.STATUS == 0) // return; LogHelper.Info("ResAllocateJob.Execute 资源分配===start==="); isSucess = true; ResAllocate exc = new ResAllocate(); exc.ResourceAllocate(); LogHelper.Info("ResAllocateJob.Execute 资源分配===complete==="); } catch (Exception e) { LogHelper.Error(string.Concat("ResAllocateJob.Execute 资源分配", e.ToString() + e.StackTrace)); } finally { isSucess = false; } } #endregion } }