Пример #1
0
 /// <summary>
 /// Remove (delete) the <see cref="T:Quartz.IJob"/> with the given
 ///             key, and any <see cref="T:Quartz.ITrigger"/> s that reference
 ///             it.
 /// </summary>
 /// <remarks>
 /// If removal of the <see cref="T:Quartz.IJob"/> results in an empty group, the
 ///             group should be removed from the <see cref="T:Quartz.Spi.IJobStore"/>'s list of
 ///             known group names.
 /// </remarks>
 /// <returns>
 /// <see langword="true"/> if a <see cref="T:Quartz.IJob"/> with the given name and
 ///             group was found and removed from the store.
 /// </returns>
 public Task <bool> RemoveJob(JobKey jobKey, CancellationToken cancellationToken = default(CancellationToken))
 {
     _logger.Info("RemoveJob");
     return(Task.FromResult(DoWithLock(() => _storage.RemoveJob(jobKey),
                                       "Could not remove a job")));
 }
Пример #2
0
 /// <summary>
 /// Remove (delete) the <see cref="T:Quartz.IJob"/> with the given
 ///             key, and any <see cref="T:Quartz.ITrigger"/> s that reference
 ///             it.
 /// </summary>
 /// <remarks>
 /// If removal of the <see cref="T:Quartz.IJob"/> results in an empty group, the
 ///             group should be removed from the <see cref="T:Quartz.Spi.IJobStore"/>'s list of
 ///             known group names.
 /// </remarks>
 /// <returns>
 /// <see langword="true"/> if a <see cref="T:Quartz.IJob"/> with the given name and
 ///             group was found and removed from the store.
 /// </returns>
 public bool RemoveJob(JobKey jobKey)
 {
     _logger.Info("RemoveJob");
     return(DoWithLock(() => _storage.RemoveJob(jobKey),
                       "Could not remove a job"));
 }