/// <summary> /// Store the given <see cref="T:Quartz.IJobDetail"/> and <see cref="T:Quartz.ITrigger"/>. /// </summary> /// <param name="newJob">The <see cref="T:Quartz.IJobDetail"/> to be stored.</param><param name="newTrigger">The <see cref="T:Quartz.ITrigger"/> to be stored.</param><throws>ObjectAlreadyExistsException </throws> public void StoreJobAndTrigger(IJobDetail newJob, IOperableTrigger newTrigger) { _logger.Info("StoreJobAndTrigger"); DoWithLock(() => { _storage.StoreJob(newJob, false); _storage.StoreTrigger(newTrigger, false); }, "Could store job/trigger"); }
/// <summary> /// Store the given <see cref="T:Quartz.IJobDetail"/> and <see cref="T:Quartz.ITrigger"/>. /// </summary> /// <param name="newJob">The <see cref="T:Quartz.IJobDetail"/> to be stored.</param><param name="newTrigger">The <see cref="T:Quartz.ITrigger"/> to be stored.</param><throws>ObjectAlreadyExistsException </throws> public Task StoreJobAndTrigger(IJobDetail newJob, IOperableTrigger newTrigger, CancellationToken cancellationToken = default(CancellationToken)) { _logger.Info("StoreJobAndTrigger"); DoWithLock(() => { _storage.StoreJob(newJob, false); _storage.StoreTrigger(newTrigger, false); }, "Could store job/trigger"); return(Task.FromResult(0)); }