AgvJob.cs 804 Bytes
using System;
using System.Threading.Tasks;
using Hh.Mes.Service.QuartzJobService;

namespace Quartz.Job
{
    /// <summary>
    /// 命名空间Quartz.Job 保持一致
    /// </summary>
    [PersistJobDataAfterExecution]
    [DisallowConcurrentExecution]
    public class AgvJob : IJob
    {
        public Task Execute(IJobExecutionContext context)
        {
            JobContainer jobContainer = null;
            try
            {
				jobContainer = new JobContainer(context);
				new AgvTaskJobService().Execute(null,null);
            }
            catch (Exception ex)
            {
                jobContainer.ExceptionInfo = ex.Message;
                jobContainer.LoggerJob();
            }
            jobContainer.UpdateJob();
            return Task.CompletedTask;
        }
    }
}