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

30 lines
712 B
C#

using Quartz;
using System;
using WX.CRM.CRMServices.SMS;
namespace WX.CRM.CRMServices.CRMJobs
{
public class BatchSmsJob : IJob
{
static bool isRuning = false;
public void Execute(JobExecutionContext context)
{
if (isRuning)
return;
isRuning = true;
try
{
new SendBatchMsg().Send();
}
catch (Exception e)
{
WX.CRM.Common.LogHelper.Error(string.Concat("WX.CRM.CRMServices.CRMJobs.BatchSmsJob.Execute ", e.Message, e.StackTrace));
}
finally
{
isRuning = false;
}
}
}
}