31 lines
778 B
C#
31 lines
778 B
C#
using Quartz;
|
|
using System;
|
|
using WX.CRM.CRMServices.WeiXin;
|
|
|
|
namespace WX.CRM.CRMServices.CRMJobs
|
|
{
|
|
public class AutoBoundJob : IJob
|
|
{
|
|
static bool isRuning = false;
|
|
public void Execute(JobExecutionContext context)
|
|
{
|
|
if (isRuning)
|
|
return;
|
|
isRuning = true;
|
|
try
|
|
{
|
|
WX.CRM.Common.LogHelper.Info("start AutoBoundJob!");
|
|
AutoBound.Bound();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
WX.CRM.Common.LogHelper.Error(string.Concat("WX.CRM.CRMServices.CRMJobs.AutoBoundJob.Execute ", e.Message, e.StackTrace));
|
|
}
|
|
finally
|
|
{
|
|
isRuning = false;
|
|
}
|
|
}
|
|
}
|
|
}
|