TG.WXCRM.V4/CRMServices/CRMJobs/GetAutoBoundJob.cs

35 lines
892 B
C#

using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WX.CRM.CRMServices.WeiXin;
namespace WX.CRM.CRMServices.CRMJobs
{
public class GetAutoBoundJob : IJob
{
static bool isRuning = false;
public void Execute(JobExecutionContext context)
{
if (isRuning)
return;
isRuning = true;
try
{
WX.CRM.Common.LogHelper.Info("start GetAutoBoundJob!");
GetAutoBound.Bound();
}
catch (Exception e)
{
WX.CRM.Common.LogHelper.Error(string.Concat("WX.CRM.CRMServices.CRMJobs.GetAutoBoundJob.Execute ", e.Message, e.StackTrace));
}
finally
{
isRuning = false;
}
}
}
}