45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using Quartz;
|
|
using Serilog;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using WPFWCSDemo.Utilities;
|
|
|
|
namespace WPFWCSDemo.Schedules.CircleRGV
|
|
{
|
|
[DisallowConcurrentExecution]
|
|
public class CircleRGVSchedule : IJob
|
|
{
|
|
public async Task Execute(IJobExecutionContext context)
|
|
{
|
|
//Application.Current.Dispatcher.InvokeAsync(() =>
|
|
//{
|
|
await Task.Run(async () =>
|
|
{
|
|
bool b = await CommonTask.Common.GetPingForRGVStation("192.168.6.100");
|
|
|
|
if (b)
|
|
{
|
|
await Update.UpdateDeviceNumber();
|
|
|
|
await Update.UpdateScheduleState();
|
|
|
|
Excute.ExecuteTask();
|
|
|
|
Generate.GenerateTask();
|
|
|
|
// //Log.Information($"-----------------设备调度-----------------");
|
|
}
|
|
});
|
|
|
|
//});
|
|
|
|
//return Task.CompletedTask;
|
|
}
|
|
}
|
|
}
|