コード例 #1
0
        public void Execute(IJobExecutionContext context)
        {
            Logger.Info("开始运行监控脚本文件");
            try
            {
                using (var client = new MonitorClient())
                {
                    var result = client.KeepJobAlive("WinService_CJob");
                    result.ThrowIfException(true);
                }
            }
            catch (Exception ex)
            {
                Logger.Warn($"WinService_JobSchedulerService{ex.Message}");
            }

            Logger.Info("脚本运行完成");
        }