30 lines
709 B
C#
30 lines
709 B
C#
using Quartz;
|
|
using System;
|
|
using WX.CRM.CRMServices.Email;
|
|
|
|
namespace WX.CRM.CRMServices.CRMJobs
|
|
{
|
|
public class SmsEmailJob : IJob
|
|
{
|
|
static bool isRuning = false;
|
|
public void Execute(JobExecutionContext context)
|
|
{
|
|
if (isRuning)
|
|
return;
|
|
isRuning = true;
|
|
try
|
|
{
|
|
new ReadEmail().ExecEmail();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
WX.CRM.Common.LogHelper.Error(string.Concat("WX.CRM.CRMServices.CRMJobs.SmsFEmailJob ", e.Message, e.StackTrace));
|
|
}
|
|
finally
|
|
{
|
|
isRuning = false;
|
|
}
|
|
}
|
|
}
|
|
}
|