コード例 #1
0
        public Task AddRecurrentJob(JobDb job)
        {
            return(_processor.Execute(() =>
            {
                var foundJob = _storage.FindRecurrentJobToUpdate(job.JobKey) ?? job.Copy();

                _storage.Remove(foundJob);

                foundJob.Cron = job.Cron;
                foundJob.StartAt = job.StartAt;

                _storage.Add(foundJob);
            }));
        }
コード例 #2
0
 public Task AddJob(JobDb job)
 {
     return(_processor.Execute(() => _storage.Add(job.Copy())));
 }