ComplianceServer/oldcode/CRMServices/Res_AlloCate/ResRecycleJob.cs

44 lines
1.1 KiB
C#

using Quartz;
using System;
using WX.CRM.BLL.Util;
using WX.CRM.Common;
namespace WX.CRM.CRMServices.Res_AlloCate
{
/// <summary>
/// 资源回收调度
/// </summary>
public class ResRecycleJob : IJob
{
static bool isSucess = false;
#region IJob Members
public void Execute(JobExecutionContext context)
{
if (isSucess)
return;
try
{
CACHE_BL _cache = new CACHE_BL();
LogHelper.Info("ResAllocateJob.Execute 资源回收===start===");
isSucess = true;
ResRecycle exc = new ResRecycle();
exc.ResourceRecycle();
LogHelper.Info("ResAllocateJob.Execute 资源回收===complete===");
}
catch (Exception e)
{
LogHelper.Error(string.Concat("ResAllocateJob.Execute 资源回收", e.ToString() + e.StackTrace));
}
finally
{
isSucess = false;
}
}
#endregion
}
}