/// <summary> /// Remove (delete) the <see cref="T:Quartz.ITrigger"/> with the /// given name, and store the new given one - which must be associated /// with the same job. /// </summary> /// <param name="triggerKey">The <see cref="T:Quartz.ITrigger"/> to be replaced.</param><param name="newTrigger">The new <see cref="T:Quartz.ITrigger"/> to be stored.</param> /// <returns> /// <see langword="true"/> if a <see cref="T:Quartz.ITrigger"/> with the given /// name and group was found and removed from the store. /// </returns> public Task <bool> ReplaceTrigger(TriggerKey triggerKey, IOperableTrigger newTrigger, CancellationToken cancellationToken = default(CancellationToken)) { _logger.Info("ReplaceTrigger"); return(Task.FromResult(DoWithLock(() => _storage.ReplaceTrigger(triggerKey, newTrigger), "Error on replacing trigger"))); }
/// <summary> /// Remove (delete) the <see cref="T:Quartz.ITrigger"/> with the /// given name, and store the new given one - which must be associated /// with the same job. /// </summary> /// <param name="triggerKey">The <see cref="T:Quartz.ITrigger"/> to be replaced.</param><param name="newTrigger">The new <see cref="T:Quartz.ITrigger"/> to be stored.</param> /// <returns> /// <see langword="true"/> if a <see cref="T:Quartz.ITrigger"/> with the given /// name and group was found and removed from the store. /// </returns> public bool ReplaceTrigger(TriggerKey triggerKey, IOperableTrigger newTrigger) { _logger.Info("ReplaceTrigger"); return(DoWithLock(() => _storage.ReplaceTrigger(triggerKey, newTrigger), "Error on replacing trigger")); }