Пример #1
0
        //job执行结束之后调用
        public async Task JobWasExecuted(IJobExecutionContext context, JobExecutionException jobException, CancellationToken cancellationToken = default(CancellationToken))
        {
            count++;
            var manage = new ScheduleManage();
            var model  = manage.GetScheduleModel(context.JobDetail.Key.Group, context.JobDetail.Key.Name);
            await Console.Out.WriteLineAsync("job执行结束之后调用  " + count);

            if (model.RunTimes != 0 && count == model.RunTimes)
            {
                count = 0;
                new ClientManage(_uowProvider).ClientSend(model.Id);
            }
        }
Пример #2
0
 static ScheduleManage()
 {
     Instance = new ScheduleManage();
 }