Esempio n. 1
0
        protected override void Tick(CancellationToken state)
        {
            var allJobs = providers.AsParallel().SelectMany(p => p.GetAllScheduleJobs().Result);
            var context = new ScheduleContext()
            {
                DateTime = DateTimeOffset.Now,
                Token    = state
            };

            Parallel.ForEach(allJobs, p => { RunJob(context, p); });
        }
Esempio n. 2
0
 protected void RunJob(ScheduleContext context, string job)
 {
     string lockKey = string.Format("{0:yyyy_MM_dd_HH_mm_ss}#{1}", context.DateTime, job);
 }