30 lines
775 B
C#
30 lines
775 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using HHWMS.Web.Models;
|
|
using Quartz;
|
|
using WalkingTec.Mvvm.Core;
|
|
using WalkingTec.Mvvm.Core.Support.Quartz;
|
|
|
|
namespace HHWMS.Web
|
|
{
|
|
//[QuartzRepeat(60,0,true)]
|
|
[PersistJobDataAfterExecution]
|
|
[DisallowConcurrentExecution]
|
|
public class TestJob : WtmJob
|
|
{
|
|
public override Task Execute(IJobExecutionContext context)
|
|
{
|
|
try
|
|
{
|
|
var _unitwork = new UnitWork(Wtm);
|
|
|
|
Wtm.DoLog("测试", ActionLogTypesEnum.Job, "TestJob");
|
|
}
|
|
catch(Exception ex) {
|
|
Wtm.DoLog("测试", ActionLogTypesEnum.Job, "TestJob", request:"error", result:ex.Message);
|
|
}
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|
|
}
|