ERPShipmentJob.cs
898 Bytes
using System;
using System.Threading.Tasks;
using Quartz;
using WebRepository;
using Task = System.Threading.Tasks.Task;
namespace WebMvc
{
[PersistJobDataAfterExecution]
[DisallowConcurrentExecution]
public class ERPShipmentJob : IJob
{
public virtual Task Execute(IJobExecutionContext context)
{
JobContainer jobContainer = new JobContainer(context);
try
{
#region 执行任务语句
ERPShipmentAction ERPShipmentAction = new ERPShipmentAction(jobContainer.ConnString, context);
ERPShipmentAction.Execute(jobContainer);
#endregion
}
catch (Exception ex)
{
jobContainer.ExceptionInfo = ex.Message;
}
jobContainer.LoggerJob();
return Task.CompletedTask;
}
}
}