using Quartz; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using XYY.Tool.QuotaReduction; namespace XYY.Tool.TimingTask.jobs { /// /// 预告客户冻结 /// public class AlertFreezeCustomerJob : IJob { public async Task Execute(IJobExecutionContext context) { RestSharp.RestClient client = new RestSharp.RestClient(JobConfig.AlertFreezeCustomerJobApi); RestSharp.RestRequest request = new RestSharp.RestRequest(RestSharp.Method.GET); //request.AddHeader("Authorization", "token 57AEDE5487260443D6BF2182D31286B1"); var result = await client.ExecuteAsync(request); Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 【冻结客户提醒】调用成功!"); } } }